Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

5
node_modules/selenium-webdriver/lib/README generated vendored Normal file
View file

@ -0,0 +1,5 @@
This directory contains modules internal to selenium-webdriver that are not
intended for general consumption. They may change at any time.
All files in this directory and the atoms/ subdirectory may only depend on
built-in JavaScript features and other modules in this directory.

604
node_modules/selenium-webdriver/lib/actions.js generated vendored Normal file
View file

@ -0,0 +1,604 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
const command = require('./command');
const error = require('./error');
const input = require('./input');
/**
* @param {!IArrayLike} args .
* @return {!Array} .
*/
function flatten(args) {
let result = [];
for (let i = 0; i < args.length; i++) {
let element = args[i];
if (Array.isArray(element)) {
result.push.apply(result, flatten(element));
} else {
result.push(element);
}
}
return result;
}
const MODIFIER_KEYS = new Set([
input.Key.ALT,
input.Key.CONTROL,
input.Key.SHIFT,
input.Key.COMMAND
]);
/**
* Checks that a key is a modifier key.
* @param {!input.Key} key The key to check.
* @throws {error.InvalidArgumentError} If the key is not a modifier key.
* @private
*/
function checkModifierKey(key) {
if (!MODIFIER_KEYS.has(key)) {
throw new error.InvalidArgumentError('Not a modifier key');
}
}
/**
* Class for defining sequences of complex user interactions. Each sequence
* will not be executed until {@link #perform} is called.
*
* This class should not be instantiated directly. Instead, obtain an instance
* using {@link ./webdriver.WebDriver#actions() WebDriver.actions()}.
*
* Sample usage:
*
* driver.actions().
* keyDown(Key.SHIFT).
* click(element1).
* click(element2).
* dragAndDrop(element3, element4).
* keyUp(Key.SHIFT).
* perform();
*
*/
class ActionSequence {
/**
* @param {!./webdriver.WebDriver} driver The driver that should be used to
* perform this action sequence.
*/
constructor(driver) {
/** @private {!./webdriver.WebDriver} */
this.driver_ = driver;
/** @private {!Array<{description: string, command: !command.Command}>} */
this.actions_ = [];
}
/**
* Schedules an action to be executed each time {@link #perform} is called on
* this instance.
*
* @param {string} description A description of the command.
* @param {!command.Command} command The command.
* @private
*/
schedule_(description, command) {
this.actions_.push({
description: description,
command: command
});
}
/**
* Executes this action sequence.
*
* @return {!./promise.Thenable} A promise that will be resolved once
* this sequence has completed.
*/
perform() {
// Make a protected copy of the scheduled actions. This will protect against
// users defining additional commands before this sequence is actually
// executed.
let actions = this.actions_.concat();
let driver = this.driver_;
return driver.controlFlow().execute(function() {
let results = actions.map(action => {
return driver.schedule(action.command, action.description);
});
return Promise.all(results);
}, 'ActionSequence.perform');
}
/**
* Moves the mouse. The location to move to may be specified in terms of the
* mouse's current location, an offset relative to the top-left corner of an
* element, or an element (in which case the middle of the element is used).
*
* @param {(!./webdriver.WebElement|{x: number, y: number})} location The
* location to drag to, as either another WebElement or an offset in
* pixels.
* @param {{x: number, y: number}=} opt_offset If the target {@code location}
* is defined as a {@link ./webdriver.WebElement}, this parameter defines
* an offset within that element. The offset should be specified in pixels
* relative to the top-left corner of the element's bounding box. If
* omitted, the element's center will be used as the target offset.
* @return {!ActionSequence} A self reference.
*/
mouseMove(location, opt_offset) {
let cmd = new command.Command(command.Name.MOVE_TO);
if (typeof location.x === 'number') {
setOffset(/** @type {{x: number, y: number}} */(location));
} else {
cmd.setParameter('element', location.getId());
if (opt_offset) {
setOffset(opt_offset);
}
}
this.schedule_('mouseMove', cmd);
return this;
/** @param {{x: number, y: number}} offset The offset to use. */
function setOffset(offset) {
cmd.setParameter('xoffset', offset.x || 0);
cmd.setParameter('yoffset', offset.y || 0);
}
}
/**
* Schedules a mouse action.
* @param {string} description A simple descriptive label for the scheduled
* action.
* @param {!command.Name} commandName The name of the command.
* @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if the previous argument is
* provided as a button.
* @return {!ActionSequence} A self reference.
* @private
*/
scheduleMouseAction_(
description, commandName, opt_elementOrButton, opt_button) {
let button;
if (typeof opt_elementOrButton === 'number') {
button = opt_elementOrButton;
} else {
if (opt_elementOrButton) {
this.mouseMove(
/** @type {!./webdriver.WebElement} */ (opt_elementOrButton));
}
button = opt_button !== void(0) ? opt_button : input.Button.LEFT;
}
let cmd = new command.Command(commandName).
setParameter('button', button);
this.schedule_(description, cmd);
return this;
}
/**
* Presses a mouse button. The mouse button will not be released until
* {@link #mouseUp} is called, regardless of whether that call is made in this
* sequence or another. The behavior for out-of-order events (e.g. mouseDown,
* click) is undefined.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseDown()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!ActionSequence} A self reference.
*/
mouseDown(opt_elementOrButton, opt_button) {
return this.scheduleMouseAction_('mouseDown',
command.Name.MOUSE_DOWN, opt_elementOrButton, opt_button);
}
/**
* Releases a mouse button. Behavior is undefined for calling this function
* without a previous call to {@link #mouseDown}.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).mouseUp()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!ActionSequence} A self reference.
*/
mouseUp(opt_elementOrButton, opt_button) {
return this.scheduleMouseAction_('mouseUp',
command.Name.MOUSE_UP, opt_elementOrButton, opt_button);
}
/**
* Convenience function for performing a "drag and drop" manuever. The target
* element may be moved to the location of another element, or by an offset (in
* pixels).
*
* @param {!./webdriver.WebElement} element The element to drag.
* @param {(!./webdriver.WebElement|{x: number, y: number})} location The
* location to drag to, either as another WebElement or an offset in
* pixels.
* @return {!ActionSequence} A self reference.
*/
dragAndDrop(element, location) {
return this.mouseDown(element).mouseMove(location).mouseUp();
}
/**
* Clicks a mouse button.
*
* If an element is provided, the mouse will first be moved to the center
* of that element. This is equivalent to:
*
* sequence.mouseMove(element).click()
*
* @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!ActionSequence} A self reference.
*/
click(opt_elementOrButton, opt_button) {
return this.scheduleMouseAction_('click',
command.Name.CLICK, opt_elementOrButton, opt_button);
}
/**
* Double-clicks a mouse button.
*
* If an element is provided, the mouse will first be moved to the center of
* that element. This is equivalent to:
*
* sequence.mouseMove(element).doubleClick()
*
* Warning: this method currently only supports the left mouse button. See
* [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
*
* @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
* the element to interact with or the button to click with.
* Defaults to {@link input.Button.LEFT} if neither an element nor
* button is specified.
* @param {input.Button=} opt_button The button to use. Defaults to
* {@link input.Button.LEFT}. Ignored if a button is provided as the
* first argument.
* @return {!ActionSequence} A self reference.
*/
doubleClick(opt_elementOrButton, opt_button) {
return this.scheduleMouseAction_('doubleClick',
command.Name.DOUBLE_CLICK, opt_elementOrButton, opt_button);
}
/**
* Schedules a keyboard action.
*
* @param {string} description A simple descriptive label for the scheduled
* action.
* @param {!Array<(string|!input.Key)>} keys The keys to send.
* @return {!ActionSequence} A self reference.
* @private
*/
scheduleKeyboardAction_(description, keys) {
let cmd = new command.Command(command.Name.SEND_KEYS_TO_ACTIVE_ELEMENT)
.setParameter('value', keys);
this.schedule_(description, cmd);
return this;
}
/**
* Performs a modifier key press. The modifier key is <em>not released</em>
* until {@link #keyUp} or {@link #sendKeys} is called. The key press will be
* targeted at the currently focused element.
*
* @param {!input.Key} key The modifier key to push. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!ActionSequence} A self reference.
* @throws {error.InvalidArgumentError} If the key is not a valid modifier
* key.
*/
keyDown(key) {
checkModifierKey(key);
return this.scheduleKeyboardAction_('keyDown', [key]);
}
/**
* Performs a modifier key release. The release is targeted at the currently
* focused element.
* @param {!input.Key} key The modifier key to release. Must be one of
* {ALT, CONTROL, SHIFT, COMMAND, META}.
* @return {!ActionSequence} A self reference.
* @throws {error.InvalidArgumentError} If the key is not a valid modifier
* key.
*/
keyUp(key) {
checkModifierKey(key);
return this.scheduleKeyboardAction_('keyUp', [key]);
}
/**
* Simulates typing multiple keys. Each modifier key encountered in the
* sequence will not be released until it is encountered again. All key events
* will be targeted at the currently focused element.
*
* @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
* The keys to type.
* @return {!ActionSequence} A self reference.
* @throws {Error} If the key is not a valid modifier key.
*/
sendKeys(var_args) {
let keys = flatten(arguments);
return this.scheduleKeyboardAction_('sendKeys', keys);
}
}
/**
* Class for defining sequences of user touch interactions. Each sequence
* will not be executed until {@link #perform} is called.
*
* This class should not be instantiated directly. Instead, obtain an instance
* using {@link ./webdriver.WebDriver#touchActions() WebDriver.touchActions()}.
*
* Sample usage:
*
* driver.touchActions().
* tapAndHold({x: 0, y: 0}).
* move({x: 3, y: 4}).
* release({x: 10, y: 10}).
* perform();
*
*/
class TouchSequence {
/**
* @param {!./webdriver.WebDriver} driver The driver that should be used to
* perform this action sequence.
*/
constructor(driver) {
/** @private {!./webdriver.WebDriver} */
this.driver_ = driver;
/** @private {!Array<{description: string, command: !command.Command}>} */
this.actions_ = [];
}
/**
* Schedules an action to be executed each time {@link #perform} is called on
* this instance.
* @param {string} description A description of the command.
* @param {!command.Command} command The command.
* @private
*/
schedule_(description, command) {
this.actions_.push({
description: description,
command: command
});
}
/**
* Executes this action sequence.
* @return {!./promise.Thenable} A promise that will be resolved once
* this sequence has completed.
*/
perform() {
// Make a protected copy of the scheduled actions. This will protect against
// users defining additional commands before this sequence is actually
// executed.
let actions = this.actions_.concat();
let driver = this.driver_;
return driver.controlFlow().execute(function() {
let results = actions.map(action => {
return driver.schedule(action.command, action.description);
});
return Promise.all(results);
}, 'TouchSequence.perform');
}
/**
* Taps an element.
*
* @param {!./webdriver.WebElement} elem The element to tap.
* @return {!TouchSequence} A self reference.
*/
tap(elem) {
let cmd = new command.Command(command.Name.TOUCH_SINGLE_TAP).
setParameter('element', elem.getId());
this.schedule_('tap', cmd);
return this;
}
/**
* Double taps an element.
*
* @param {!./webdriver.WebElement} elem The element to double tap.
* @return {!TouchSequence} A self reference.
*/
doubleTap(elem) {
let cmd = new command.Command(command.Name.TOUCH_DOUBLE_TAP).
setParameter('element', elem.getId());
this.schedule_('doubleTap', cmd);
return this;
}
/**
* Long press on an element.
*
* @param {!./webdriver.WebElement} elem The element to long press.
* @return {!TouchSequence} A self reference.
*/
longPress(elem) {
let cmd = new command.Command(command.Name.TOUCH_LONG_PRESS).
setParameter('element', elem.getId());
this.schedule_('longPress', cmd);
return this;
}
/**
* Touch down at the given location.
*
* @param {{x: number, y: number}} location The location to touch down at.
* @return {!TouchSequence} A self reference.
*/
tapAndHold(location) {
let cmd = new command.Command(command.Name.TOUCH_DOWN).
setParameter('x', location.x).
setParameter('y', location.y);
this.schedule_('tapAndHold', cmd);
return this;
}
/**
* Move a held {@linkplain #tapAndHold touch} to the specified location.
*
* @param {{x: number, y: number}} location The location to move to.
* @return {!TouchSequence} A self reference.
*/
move(location) {
let cmd = new command.Command(command.Name.TOUCH_MOVE).
setParameter('x', location.x).
setParameter('y', location.y);
this.schedule_('move', cmd);
return this;
}
/**
* Release a held {@linkplain #tapAndHold touch} at the specified location.
*
* @param {{x: number, y: number}} location The location to release at.
* @return {!TouchSequence} A self reference.
*/
release(location) {
let cmd = new command.Command(command.Name.TOUCH_UP).
setParameter('x', location.x).
setParameter('y', location.y);
this.schedule_('release', cmd);
return this;
}
/**
* Scrolls the touch screen by the given offset.
*
* @param {{x: number, y: number}} offset The offset to scroll to.
* @return {!TouchSequence} A self reference.
*/
scroll(offset) {
let cmd = new command.Command(command.Name.TOUCH_SCROLL).
setParameter('xoffset', offset.x).
setParameter('yoffset', offset.y);
this.schedule_('scroll', cmd);
return this;
}
/**
* Scrolls the touch screen, starting on `elem` and moving by the specified
* offset.
*
* @param {!./webdriver.WebElement} elem The element where scroll starts.
* @param {{x: number, y: number}} offset The offset to scroll to.
* @return {!TouchSequence} A self reference.
*/
scrollFromElement(elem, offset) {
let cmd = new command.Command(command.Name.TOUCH_SCROLL).
setParameter('element', elem.getId()).
setParameter('xoffset', offset.x).
setParameter('yoffset', offset.y);
this.schedule_('scrollFromElement', cmd);
return this;
}
/**
* Flick, starting anywhere on the screen, at speed xspeed and yspeed.
*
* @param {{xspeed: number, yspeed: number}} speed The speed to flick in each
direction, in pixels per second.
* @return {!TouchSequence} A self reference.
*/
flick(speed) {
let cmd = new command.Command(command.Name.TOUCH_FLICK).
setParameter('xspeed', speed.xspeed).
setParameter('yspeed', speed.yspeed);
this.schedule_('flick', cmd);
return this;
}
/**
* Flick starting at elem and moving by x and y at specified speed.
*
* @param {!./webdriver.WebElement} elem The element where flick starts.
* @param {{x: number, y: number}} offset The offset to flick to.
* @param {number} speed The speed to flick at in pixels per second.
* @return {!TouchSequence} A self reference.
*/
flickElement(elem, offset, speed) {
let cmd = new command.Command(command.Name.TOUCH_FLICK).
setParameter('element', elem.getId()).
setParameter('xoffset', offset.x).
setParameter('yoffset', offset.y).
setParameter('speed', speed);
this.schedule_('flickElement', cmd);
return this;
}
}
// PUBLIC API
module.exports = {
ActionSequence: ActionSequence,
TouchSequence: TouchSequence,
};

285
node_modules/selenium-webdriver/lib/by.js generated vendored Normal file
View file

@ -0,0 +1,285 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* @fileoverview Factory methods for the supported locator strategies.
*/
/**
* Short-hand expressions for the primary element locator strategies.
* For example the following two statements are equivalent:
*
* var e1 = driver.findElement(By.id('foo'));
* var e2 = driver.findElement({id: 'foo'});
*
* Care should be taken when using JavaScript minifiers (such as the
* Closure compiler), as locator hashes will always be parsed using
* the un-obfuscated properties listed.
*
* @typedef {(
* {className: string}|
* {css: string}|
* {id: string}|
* {js: string}|
* {linkText: string}|
* {name: string}|
* {partialLinkText: string}|
* {tagName: string}|
* {xpath: string})}
*/
var ByHash;
/**
* Error thrown if an invalid character is encountered while escaping a CSS
* identifier.
* @see https://drafts.csswg.org/cssom/#serialize-an-identifier
*/
class InvalidCharacterError extends Error {
constructor() {
super();
this.name = this.constructor.name;
}
}
/**
* Escapes a CSS string.
* @param {string} css the string to escape.
* @return {string} the escaped string.
* @throws {TypeError} if the input value is not a string.
* @throws {InvalidCharacterError} if the string contains an invalid character.
* @see https://drafts.csswg.org/cssom/#serialize-an-identifier
*/
function escapeCss(css) {
if (typeof css !== 'string') {
throw new TypeError('input must be a string');
}
let ret = '';
const n = css.length;
for (let i = 0; i < n; i++) {
const c = css.charCodeAt(i);
if (c == 0x0) {
throw new InvalidCharacterError();
}
if ((c >= 0x0001 && c <= 0x001F)
|| c == 0x007F
|| (i == 0 && c >= 0x0030 && c <= 0x0039)
|| (i == 1 && c >= 0x0030 && c <= 0x0039
&& css.charCodeAt(0) == 0x002D)) {
ret += '\\' + c.toString(16) + ' ';
continue;
}
if (i == 0 && c == 0x002D && n == 1) {
ret += '\\' + css.charAt(i);
continue;
}
if (c >= 0x0080
|| c == 0x002D // -
|| c == 0x005F // _
|| (c >= 0x0030 && c <= 0x0039) // [0-9]
|| (c >= 0x0041 && c <= 0x005A) // [A-Z]
|| (c >= 0x0061 && c <= 0x007A)) { // [a-z]
ret += css.charAt(i);
continue;
}
ret += '\\' + css.charAt(i);
}
return ret;
}
/**
* Describes a mechanism for locating an element on the page.
* @final
*/
class By {
/**
* @param {string} using the name of the location strategy to use.
* @param {string} value the value to search for.
*/
constructor(using, value) {
/** @type {string} */
this.using = using;
/** @type {string} */
this.value = value;
}
/**
* Locates elements that have a specific class name.
*
* @param {string} name The class name to search for.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
* @see http://www.w3.org/TR/CSS2/selector.html#class-html
*/
static className(name) {
let names = name.split(/\s+/g)
.filter(s => s.length > 0)
.map(s => escapeCss(s));
return By.css('.' + names.join('.'));
}
/**
* Locates elements using a CSS selector.
*
* @param {string} selector The CSS selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/CSS2/selector.html
*/
static css(selector) {
return new By('css selector', selector);
}
/**
* Locates elements by the ID attribute. This locator uses the CSS selector
* `*[id="$ID"]`, _not_ `document.getElementById`.
*
* @param {string} id The ID to search for.
* @return {!By} The new locator.
*/
static id(id) {
return By.css('*[id="' + escapeCss(id) + '"]');
}
/**
* Locates link elements whose
* {@linkplain webdriver.WebElement#getText visible text} matches the given
* string.
*
* @param {string} text The link text to search for.
* @return {!By} The new locator.
*/
static linkText(text) {
return new By('link text', text);
}
/**
* Locates an elements by evaluating a
* {@linkplain webdriver.WebDriver#executeScript JavaScript expression}.
* The result of this expression must be an element or list of elements.
*
* @param {!(string|Function)} script The script to execute.
* @param {...*} var_args The arguments to pass to the script.
* @return {function(!./webdriver.WebDriver): !./promise.Promise}
* A new JavaScript-based locator function.
*/
static js(script, var_args) {
let args = Array.prototype.slice.call(arguments, 0);
return function(driver) {
return driver.executeScript.apply(driver, args);
};
}
/**
* Locates elements whose `name` attribute has the given value.
*
* @param {string} name The name attribute to search for.
* @return {!By} The new locator.
*/
static name(name) {
return By.css('*[name="' + escapeCss(name) + '"]');
}
/**
* Locates link elements whose
* {@linkplain webdriver.WebElement#getText visible text} contains the given
* substring.
*
* @param {string} text The substring to check for in a link's visible text.
* @return {!By} The new locator.
*/
static partialLinkText(text) {
return new By('partial link text', text);
}
/**
* Locates elements with a given tag name.
*
* @param {string} name The tag name to search for.
* @return {!By} The new locator.
* @deprecated Use {@link By.css() By.css(tagName)} instead.
*/
static tagName(name) {
return By.css(name);
}
/**
* Locates elements matching a XPath selector. Care should be taken when
* using an XPath selector with a {@link webdriver.WebElement} as WebDriver
* will respect the context in the specified in the selector. For example,
* given the selector `//div`, WebDriver will search from the document root
* regardless of whether the locator was used with a WebElement.
*
* @param {string} xpath The XPath selector to use.
* @return {!By} The new locator.
* @see http://www.w3.org/TR/xpath/
*/
static xpath(xpath) {
return new By('xpath', xpath);
}
/** @override */
toString() {
// The static By.name() overrides this.constructor.name. Shame...
return `By(${this.using}, ${this.value})`;
}
}
/**
* Checks if a value is a valid locator.
* @param {!(By|Function|ByHash)} locator The value to check.
* @return {!(By|Function)} The valid locator.
* @throws {TypeError} If the given value does not define a valid locator
* strategy.
*/
function check(locator) {
if (locator instanceof By || typeof locator === 'function') {
return locator;
}
if (locator
&& typeof locator === 'object'
&& typeof locator.using === 'string'
&& typeof locator.value === 'string') {
return new By(locator.using, locator.value);
}
for (let key in locator) {
if (locator.hasOwnProperty(key) && By.hasOwnProperty(key)) {
return By[key](locator[key]);
}
}
throw new TypeError('Invalid locator');
}
// PUBLIC API
module.exports = {
By: By,
checkedLocator: check,
};

489
node_modules/selenium-webdriver/lib/capabilities.js generated vendored Normal file
View file

@ -0,0 +1,489 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* @fileoverview Defines types related to describing the capabilities of a
* WebDriver session.
*/
const Symbols = require('./symbols');
/**
* Recognized browser names.
* @enum {string}
*/
const Browser = {
ANDROID: 'android',
CHROME: 'chrome',
EDGE: 'MicrosoftEdge',
FIREFOX: 'firefox',
IE: 'internet explorer',
INTERNET_EXPLORER: 'internet explorer',
IPAD: 'iPad',
IPHONE: 'iPhone',
OPERA: 'opera',
PHANTOM_JS: 'phantomjs',
SAFARI: 'safari',
HTMLUNIT: 'htmlunit'
};
/**
* Common Capability keys.
* @enum {string}
*/
const Capability = {
/**
* Indicates whether a driver should accept all SSL certs by default. This
* capability only applies when requesting a new session. To query whether
* a driver can handle insecure SSL certs, see {@link #SECURE_SSL}.
*/
ACCEPT_SSL_CERTS: 'acceptSslCerts',
/**
* The browser name. Common browser names are defined in the {@link Browser}
* enum.
*/
BROWSER_NAME: 'browserName',
/**
* Defines how elements should be scrolled into the viewport for interaction.
* This capability will be set to zero (0) if elements are aligned with the
* top of the viewport, or one (1) if aligned with the bottom. The default
* behavior is to align with the top of the viewport.
*/
ELEMENT_SCROLL_BEHAVIOR: 'elementScrollBehavior',
/**
* Whether the driver is capable of handling modal alerts (e.g. alert,
* confirm, prompt). To define how a driver <i>should</i> handle alerts,
* use {@link #UNEXPECTED_ALERT_BEHAVIOR}.
*/
HANDLES_ALERTS: 'handlesAlerts',
/**
* Key for the logging driver logging preferences.
*/
LOGGING_PREFS: 'loggingPrefs',
/**
* Whether this session generates native events when simulating user input.
*/
NATIVE_EVENTS: 'nativeEvents',
/**
* Describes the platform the browser is running on. Will be one of
* ANDROID, IOS, LINUX, MAC, UNIX, or WINDOWS. When <i>requesting</i> a
* session, ANY may be used to indicate no platform preference (this is
* semantically equivalent to omitting the platform capability).
*/
PLATFORM: 'platform',
/**
* Describes the proxy configuration to use for a new WebDriver session.
*/
PROXY: 'proxy',
/** Whether the driver supports changing the browser's orientation. */
ROTATABLE: 'rotatable',
/**
* Whether a driver is only capable of handling secure SSL certs. To request
* that a driver accept insecure SSL certs by default, use
* {@link #ACCEPT_SSL_CERTS}.
*/
SECURE_SSL: 'secureSsl',
/** Whether the driver supports manipulating the app cache. */
SUPPORTS_APPLICATION_CACHE: 'applicationCacheEnabled',
/** Whether the driver supports locating elements with CSS selectors. */
SUPPORTS_CSS_SELECTORS: 'cssSelectorsEnabled',
/** Whether the browser supports JavaScript. */
SUPPORTS_JAVASCRIPT: 'javascriptEnabled',
/** Whether the driver supports controlling the browser's location info. */
SUPPORTS_LOCATION_CONTEXT: 'locationContextEnabled',
/** Whether the driver supports taking screenshots. */
TAKES_SCREENSHOT: 'takesScreenshot',
/**
* Defines how the driver should handle unexpected alerts. The value should
* be one of "accept", "dismiss", or "ignore".
*/
UNEXPECTED_ALERT_BEHAVIOR: 'unexpectedAlertBehaviour',
/** Defines the browser version. */
VERSION: 'version'
};
/**
* Describes how a proxy should be configured for a WebDriver session.
* @record
*/
function ProxyConfig() {}
/**
* The proxy type. Must be one of {"manual", "pac", "system"}.
* @type {string}
*/
ProxyConfig.prototype.proxyType;
/**
* URL for the PAC file to use. Only used if {@link #proxyType} is "pac".
* @type {(string|undefined)}
*/
ProxyConfig.prototype.proxyAutoconfigUrl;
/**
* The proxy host for FTP requests. Only used if {@link #proxyType} is "manual".
* @type {(string|undefined)}
*/
ProxyConfig.prototype.ftpProxy;
/**
* The proxy host for HTTP requests. Only used if {@link #proxyType} is
* "manual".
* @type {(string|undefined)}
*/
ProxyConfig.prototype.httpProxy;
/**
* The proxy host for HTTPS requests. Only used if {@link #proxyType} is
* "manual".
* @type {(string|undefined)}
*/
ProxyConfig.prototype.sslProxy;
/**
* A comma delimited list of hosts which should bypass all proxies. Only used if
* {@link #proxyType} is "manual".
* @type {(string|undefined)}
*/
ProxyConfig.prototype.noProxy;
/**
* Converts a generic hash object to a map.
* @param {!Object<string, ?>} hash The hash object.
* @return {!Map<string, ?>} The converted map.
*/
function toMap(hash) {
let m = new Map;
for (let key in hash) {
if (hash.hasOwnProperty(key)) {
m.set(key, hash[key]);
}
}
return m;
}
/**
* Describes a set of capabilities for a WebDriver session.
*/
class Capabilities {
/**
* @param {(Capabilities|Map<string, ?>|Object)=} other Another set of
* capabilities to initialize this instance from.
*/
constructor(other = undefined) {
if (other instanceof Capabilities) {
other = other.map_;
} else if (other && !(other instanceof Map)) {
other = toMap(other);
}
/** @private @const {!Map<string, ?>} */
this.map_ = new Map(other);
}
/**
* @return {!Capabilities} A basic set of capabilities for Android.
*/
static android() {
return new Capabilities()
.set(Capability.BROWSER_NAME, Browser.ANDROID);
}
/**
* @return {!Capabilities} A basic set of capabilities for Chrome.
*/
static chrome() {
return new Capabilities().set(Capability.BROWSER_NAME, Browser.CHROME);
}
/**
* @return {!Capabilities} A basic set of capabilities for Microsoft Edge.
*/
static edge() {
return new Capabilities()
.set(Capability.BROWSER_NAME, Browser.EDGE);
}
/**
* @return {!Capabilities} A basic set of capabilities for Firefox.
*/
static firefox() {
return new Capabilities().set(Capability.BROWSER_NAME, Browser.FIREFOX);
}
/**
* @return {!Capabilities} A basic set of capabilities for Internet Explorer.
*/
static ie() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.INTERNET_EXPLORER);
}
/**
* @return {!Capabilities} A basic set of capabilities for iPad.
*/
static ipad() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.IPAD);
}
/**
* @return {!Capabilities} A basic set of capabilities for iPhone.
*/
static iphone() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.IPHONE);
}
/**
* @return {!Capabilities} A basic set of capabilities for Opera.
*/
static opera() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.OPERA);
}
/**
* @return {!Capabilities} A basic set of capabilities for PhantomJS.
*/
static phantomjs() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.PHANTOM_JS);
}
/**
* @return {!Capabilities} A basic set of capabilities for Safari.
*/
static safari() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.SAFARI);
}
/**
* @return {!Capabilities} A basic set of capabilities for HTMLUnit.
*/
static htmlunit() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.HTMLUNIT);
}
/**
* @return {!Capabilities} A basic set of capabilities for HTMLUnit
* with enabled Javascript.
*/
static htmlunitwithjs() {
return new Capabilities().
set(Capability.BROWSER_NAME, Browser.HTMLUNIT).
set(Capability.SUPPORTS_JAVASCRIPT, true);
}
/**
* @return {!Object<string, ?>} The JSON representation of this instance.
* Note, the returned object may contain nested promised values.
* @suppress {checkTypes} Suppress [] access on a struct (state inherited from
* Map).
*/
[Symbols.serialize]() {
return serialize(this);
}
/**
* @param {string} key the parameter key to get.
* @return {T} the stored parameter value.
* @template T
*/
get(key) {
return this.map_.get(key);
}
/**
* @param {string} key the key to test.
* @return {boolean} whether this capability set has the specified key.
*/
has(key) {
return this.map_.has(key);
}
/**
* @return {!Iterator<string>} an iterator of the keys set.
*/
keys() {
return this.map_.keys();
}
/** @return {number} The number of capabilities set. */
get size() {
return this.map_.size;
}
/**
* Merges another set of capabilities into this instance.
* @param {!(Capabilities|Map<String, ?>|Object<string, ?>)} other The other
* set of capabilities to merge.
* @return {!Capabilities} A self reference.
*/
merge(other) {
if (!other) {
throw new TypeError('no capabilities provided for merge');
}
let map;
if (other instanceof Capabilities) {
map = other.map_;
} else if (other instanceof Map) {
map = other;
} else {
other = toMap(other);
}
for (let key of other.keys()) {
this.set(key, other.get(key));
}
return this;
}
/**
* Deletes an entry from this set of capabilities.
*
* @param {string} key the capability key to delete.
*/
delete(key) {
this.map_.delete(key);
}
/**
* @param {string} key The capability key.
* @param {*} value The capability value.
* @return {!Capabilities} A self reference.
* @throws {TypeError} If the `key` is not a string.
*/
set(key, value) {
if (typeof key !== 'string') {
throw new TypeError('Capability keys must be strings: ' + typeof key);
}
this.map_.set(key, value);
return this;
}
/**
* Sets the logging preferences. Preferences may be specified as a
* {@link ./logging.Preferences} instance, or as a map of log-type to
* log-level.
* @param {!(./logging.Preferences|Object<string>)} prefs The logging
* preferences.
* @return {!Capabilities} A self reference.
*/
setLoggingPrefs(prefs) {
return this.set(Capability.LOGGING_PREFS, prefs);
}
/**
* Sets the proxy configuration for this instance.
* @param {ProxyConfig} proxy The desired proxy configuration.
* @return {!Capabilities} A self reference.
*/
setProxy(proxy) {
return this.set(Capability.PROXY, proxy);
}
/**
* Sets whether native events should be used.
* @param {boolean} enabled Whether to enable native events.
* @return {!Capabilities} A self reference.
*/
setEnableNativeEvents(enabled) {
return this.set(Capability.NATIVE_EVENTS, enabled);
}
/**
* Sets how elements should be scrolled into view for interaction.
* @param {number} behavior The desired scroll behavior: either 0 to align
* with the top of the viewport or 1 to align with the bottom.
* @return {!Capabilities} A self reference.
*/
setScrollBehavior(behavior) {
return this.set(Capability.ELEMENT_SCROLL_BEHAVIOR, behavior);
}
/**
* Sets the default action to take with an unexpected alert before returning
* an error.
* @param {string} behavior The desired behavior should be "accept",
* "dismiss", or "ignore". Defaults to "dismiss".
* @return {!Capabilities} A self reference.
*/
setAlertBehavior(behavior) {
return this.set(Capability.UNEXPECTED_ALERT_BEHAVIOR, behavior);
}
}
/**
* Serializes a capabilities object. This is defined as a standalone function
* so it may be type checked (where Capabilities[Symbols.serialize] has type
* checking disabled since it is defined with [] access on a struct).
*
* @param {!Capabilities} caps The capabilities to serialize.
* @return {!Object<string, ?>} The JSON representation of this instance.
* Note, the returned object may contain nested promised values.
*/
function serialize(caps) {
let ret = {};
for (let key of caps.keys()) {
let cap = caps.get(key);
if (cap !== undefined && cap !== null) {
ret[key] = cap;
}
}
return ret;
}
// PUBLIC API
module.exports = {
Browser: Browser,
Capabilities: Capabilities,
Capability: Capability,
ProxyConfig: ProxyConfig
};

245
node_modules/selenium-webdriver/lib/command.js generated vendored Normal file
View file

@ -0,0 +1,245 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
/**
* @fileoverview Contains several classes for handling commands.
*/
'use strict';
/**
* Describes a command to execute.
* @final
*/
class Command {
/** @param {string} name The name of this command. */
constructor(name) {
/** @private {string} */
this.name_ = name;
/** @private {!Object<*>} */
this.parameters_ = {};
}
/** @return {string} This command's name. */
getName() {
return this.name_;
}
/**
* Sets a parameter to send with this command.
* @param {string} name The parameter name.
* @param {*} value The parameter value.
* @return {!Command} A self reference.
*/
setParameter(name, value) {
this.parameters_[name] = value;
return this;
}
/**
* Sets the parameters for this command.
* @param {!Object<*>} parameters The command parameters.
* @return {!Command} A self reference.
*/
setParameters(parameters) {
this.parameters_ = parameters;
return this;
}
/**
* Returns a named command parameter.
* @param {string} key The parameter key to look up.
* @return {*} The parameter value, or undefined if it has not been set.
*/
getParameter(key) {
return this.parameters_[key];
}
/**
* @return {!Object<*>} The parameters to send with this command.
*/
getParameters() {
return this.parameters_;
}
}
/**
* Enumeration of predefined names command names that all command processors
* will support.
* @enum {string}
*/
// TODO: Delete obsolete command names.
const Name = {
GET_SERVER_STATUS: 'getStatus',
NEW_SESSION: 'newSession',
GET_SESSIONS: 'getSessions',
DESCRIBE_SESSION: 'getSessionCapabilities',
CLOSE: 'close',
QUIT: 'quit',
GET_CURRENT_URL: 'getCurrentUrl',
GET: 'get',
GO_BACK: 'goBack',
GO_FORWARD: 'goForward',
REFRESH: 'refresh',
ADD_COOKIE: 'addCookie',
GET_COOKIE: 'getCookie',
GET_ALL_COOKIES: 'getCookies',
DELETE_COOKIE: 'deleteCookie',
DELETE_ALL_COOKIES: 'deleteAllCookies',
GET_ACTIVE_ELEMENT: 'getActiveElement',
FIND_ELEMENT: 'findElement',
FIND_ELEMENTS: 'findElements',
FIND_CHILD_ELEMENT: 'findChildElement',
FIND_CHILD_ELEMENTS: 'findChildElements',
CLEAR_ELEMENT: 'clearElement',
CLICK_ELEMENT: 'clickElement',
SEND_KEYS_TO_ELEMENT: 'sendKeysToElement',
SUBMIT_ELEMENT: 'submitElement',
GET_CURRENT_WINDOW_HANDLE: 'getCurrentWindowHandle',
GET_WINDOW_HANDLES: 'getWindowHandles',
GET_WINDOW_POSITION: 'getWindowPosition',
SET_WINDOW_POSITION: 'setWindowPosition',
GET_WINDOW_SIZE: 'getWindowSize',
SET_WINDOW_SIZE: 'setWindowSize',
MAXIMIZE_WINDOW: 'maximizeWindow',
SWITCH_TO_WINDOW: 'switchToWindow',
SWITCH_TO_FRAME: 'switchToFrame',
GET_PAGE_SOURCE: 'getPageSource',
GET_TITLE: 'getTitle',
EXECUTE_SCRIPT: 'executeScript',
EXECUTE_ASYNC_SCRIPT: 'executeAsyncScript',
GET_ELEMENT_TEXT: 'getElementText',
GET_ELEMENT_TAG_NAME: 'getElementTagName',
IS_ELEMENT_SELECTED: 'isElementSelected',
IS_ELEMENT_ENABLED: 'isElementEnabled',
IS_ELEMENT_DISPLAYED: 'isElementDisplayed',
GET_ELEMENT_LOCATION: 'getElementLocation',
GET_ELEMENT_LOCATION_IN_VIEW: 'getElementLocationOnceScrolledIntoView',
GET_ELEMENT_SIZE: 'getElementSize',
GET_ELEMENT_ATTRIBUTE: 'getElementAttribute',
GET_ELEMENT_VALUE_OF_CSS_PROPERTY: 'getElementValueOfCssProperty',
ELEMENT_EQUALS: 'elementEquals',
SCREENSHOT: 'screenshot',
TAKE_ELEMENT_SCREENSHOT: 'takeElementScreenshot',
IMPLICITLY_WAIT: 'implicitlyWait',
SET_SCRIPT_TIMEOUT: 'setScriptTimeout',
GET_TIMEOUT: 'getTimeout',
SET_TIMEOUT: 'setTimeout',
ACCEPT_ALERT: 'acceptAlert',
DISMISS_ALERT: 'dismissAlert',
GET_ALERT_TEXT: 'getAlertText',
SET_ALERT_TEXT: 'setAlertValue',
SET_ALERT_CREDENTIALS: 'setAlertCredentials',
EXECUTE_SQL: 'executeSQL',
GET_LOCATION: 'getLocation',
SET_LOCATION: 'setLocation',
GET_APP_CACHE: 'getAppCache',
GET_APP_CACHE_STATUS: 'getStatus',
CLEAR_APP_CACHE: 'clearAppCache',
IS_BROWSER_ONLINE: 'isBrowserOnline',
SET_BROWSER_ONLINE: 'setBrowserOnline',
GET_LOCAL_STORAGE_ITEM: 'getLocalStorageItem',
GET_LOCAL_STORAGE_KEYS: 'getLocalStorageKeys',
SET_LOCAL_STORAGE_ITEM: 'setLocalStorageItem',
REMOVE_LOCAL_STORAGE_ITEM: 'removeLocalStorageItem',
CLEAR_LOCAL_STORAGE: 'clearLocalStorage',
GET_LOCAL_STORAGE_SIZE: 'getLocalStorageSize',
GET_SESSION_STORAGE_ITEM: 'getSessionStorageItem',
GET_SESSION_STORAGE_KEYS: 'getSessionStorageKey',
SET_SESSION_STORAGE_ITEM: 'setSessionStorageItem',
REMOVE_SESSION_STORAGE_ITEM: 'removeSessionStorageItem',
CLEAR_SESSION_STORAGE: 'clearSessionStorage',
GET_SESSION_STORAGE_SIZE: 'getSessionStorageSize',
SET_SCREEN_ORIENTATION: 'setScreenOrientation',
GET_SCREEN_ORIENTATION: 'getScreenOrientation',
// These belong to the Advanced user interactions - an element is
// optional for these commands.
CLICK: 'mouseClick',
DOUBLE_CLICK: 'mouseDoubleClick',
MOUSE_DOWN: 'mouseButtonDown',
MOUSE_UP: 'mouseButtonUp',
MOVE_TO: 'mouseMoveTo',
SEND_KEYS_TO_ACTIVE_ELEMENT: 'sendKeysToActiveElement',
// These belong to the Advanced Touch API
TOUCH_SINGLE_TAP: 'touchSingleTap',
TOUCH_DOWN: 'touchDown',
TOUCH_UP: 'touchUp',
TOUCH_MOVE: 'touchMove',
TOUCH_SCROLL: 'touchScroll',
TOUCH_DOUBLE_TAP: 'touchDoubleTap',
TOUCH_LONG_PRESS: 'touchLongPress',
TOUCH_FLICK: 'touchFlick',
GET_AVAILABLE_LOG_TYPES: 'getAvailableLogTypes',
GET_LOG: 'getLog',
GET_SESSION_LOGS: 'getSessionLogs',
// Non-standard commands used by the standalone Selenium server.
UPLOAD_FILE: 'uploadFile'
};
/**
* Handles the execution of WebDriver {@link Command commands}.
* @interface
*/
class Executor {
/**
* Executes the given {@code command}. If there is an error executing the
* command, the provided callback will be invoked with the offending error.
* Otherwise, the callback will be invoked with a null Error and non-null
* response object.
*
* @param {!Command} command The command to execute.
* @return {!Promise<?>} A promise that will be fulfilled with the command
* result.
*/
execute(command) {}
}
// PUBLIC API
module.exports = {
Command: Command,
Name: Name,
Executor: Executor
};

34
node_modules/selenium-webdriver/lib/devmode.js generated vendored Normal file
View file

@ -0,0 +1,34 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
/**
* @fileoverview Module used to detect if scripts are loaded from the Selenium
* project repo instead of from a deployed package.
*/
'use strict';
const fs = require('fs');
const path = require('path');
/**
* @const {boolean}
*/
module.exports = (function() {
let buildDescFile = path.join(__dirname, '..', '..', 'build.desc');
return fs.existsSync(buildDescFile);
})();

210
node_modules/selenium-webdriver/lib/events.js generated vendored Normal file
View file

@ -0,0 +1,210 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* Describes an event listener registered on an {@linkplain EventEmitter}.
*/
class Listener {
/**
* @param {!Function} fn The actual listener function.
* @param {(Object|undefined)} scope The object in whose scope to invoke the
* listener.
* @param {boolean} oneshot Whether this listener should only be used once.
*/
constructor(fn, scope, oneshot) {
this.fn = fn;
this.scope = scope;
this.oneshot = oneshot;
}
}
/** @type {!WeakMap<!EventEmitter, !Map<string, !Set<!Listener>>>} */
const EVENTS = new WeakMap;
/**
* Object that can emit events for others to listen for.
*/
class EventEmitter {
/**
* Fires an event and calls all listeners.
* @param {string} type The type of event to emit.
* @param {...*} var_args Any arguments to pass to each listener.
*/
emit(type, var_args) {
let events = EVENTS.get(this);
if (!events) {
return;
}
let args = Array.prototype.slice.call(arguments, 1);
let listeners = events.get(type);
if (listeners) {
for (let listener of listeners) {
listener.fn.apply(listener.scope, args);
if (listener.oneshot) {
listeners.delete(listener);
}
}
}
}
/**
* Returns a mutable list of listeners for a specific type of event.
* @param {string} type The type of event to retrieve the listeners for.
* @return {!Set<!Listener>} The registered listeners for the given event
* type.
*/
listeners(type) {
let events = EVENTS.get(this);
if (!events) {
events = new Map;
EVENTS.set(this, events);
}
let listeners = events.get(type);
if (!listeners) {
listeners = new Set;
events.set(type, listeners);
}
return listeners;
}
/**
* Registers a listener.
* @param {string} type The type of event to listen for.
* @param {!Function} fn The function to invoke when the event is fired.
* @param {Object=} opt_self The object in whose scope to invoke the listener.
* @param {boolean=} opt_oneshot Whether the listener should b (e removed after
* the first event is fired.
* @return {!EventEmitter} A self reference.
* @private
*/
addListener_(type, fn, opt_self, opt_oneshot) {
let listeners = this.listeners(type);
for (let listener of listeners) {
if (listener.fn === fn) {
return this;
}
}
listeners.add(new Listener(fn, opt_self || undefined, !!opt_oneshot));
return this;
}
/**
* Registers a listener.
* @param {string} type The type of event to listen for.
* @param {!Function} fn The function to invoke when the event is fired.
* @param {Object=} opt_self The object in whose scope to invoke the listener.
* @return {!EventEmitter} A self reference.
*/
addListener(type, fn, opt_self) {
return this.addListener_(type, fn, opt_self, false);
}
/**
* Registers a one-time listener which will be called only the first time an
* event is emitted, after which it will be removed.
* @param {string} type The type of event to listen for.
* @param {!Function} fn The function to invoke when the event is fired.
* @param {Object=} opt_self The object in whose scope to invoke the listener.
* @return {!EventEmitter} A self reference.
*/
once(type, fn, opt_self) {
return this.addListener_(type, fn, opt_self, true);
}
/**
* An alias for {@link #addListener() addListener()}.
* @param {string} type The type of event to listen for.
* @param {!Function} fn The function to invoke when the event is fired.
* @param {Object=} opt_self The object in whose scope to invoke the listener.
* @return {!EventEmitter} A self reference.
*/
on(type, fn, opt_self) {
return this.addListener(type, fn, opt_self);
}
/**
* Removes a previously registered event listener.
* @param {string} type The type of event to unregister.
* @param {!Function} listenerFn The handler function to remove.
* @return {!EventEmitter} A self reference.
*/
removeListener(type, listenerFn) {
if (typeof type !== 'string' || typeof listenerFn !== 'function') {
throw TypeError('invalid args: expected (string, function), got ('
+ (typeof type) + ', ' + (typeof listenerFn) + ')');
}
let events = EVENTS.get(this);
if (!events) {
return this;
}
let listeners = events.get(type);
if (!listeners) {
return this;
}
let match;
for (let listener of listeners) {
if (listener.fn === listenerFn) {
match = listener;
break;
}
}
if (match) {
listeners.delete(match);
if (!listeners.size) {
events.delete(type);
}
}
return this;
}
/**
* Removes all listeners for a specific type of event. If no event is
* specified, all listeners across all types will be removed.
* @param {string=} opt_type The type of event to remove listeners from.
* @return {!EventEmitter} A self reference.
*/
removeAllListeners(opt_type) {
let events = EVENTS.get(this);
if (events) {
if (typeof opt_type === 'string') {
events.delete(opt_type);
} else {
EVENTS.delete(this);
}
}
return this;
}
}
// PUBLIC API
module.exports = {
EventEmitter: EventEmitter,
Listener: Listener
};

171
node_modules/selenium-webdriver/lib/input.js generated vendored Normal file
View file

@ -0,0 +1,171 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* @fileoverview Defines types related to user input with the WebDriver API.
*/
/**
* Enumeration of the buttons used in the advanced interactions API.
* @enum {number}
*/
const Button = {
LEFT: 0,
MIDDLE: 1,
RIGHT: 2
};
/**
* Representations of pressable keys that aren't text. These are stored in
* the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to
* http://www.google.com.au/search?&q=unicode+pua&btnG=Search
*
* @enum {string}
*/
const Key = {
NULL: '\uE000',
CANCEL: '\uE001', // ^break
HELP: '\uE002',
BACK_SPACE: '\uE003',
TAB: '\uE004',
CLEAR: '\uE005',
RETURN: '\uE006',
ENTER: '\uE007',
SHIFT: '\uE008',
CONTROL: '\uE009',
ALT: '\uE00A',
PAUSE: '\uE00B',
ESCAPE: '\uE00C',
SPACE: '\uE00D',
PAGE_UP: '\uE00E',
PAGE_DOWN: '\uE00F',
END: '\uE010',
HOME: '\uE011',
ARROW_LEFT: '\uE012',
LEFT: '\uE012',
ARROW_UP: '\uE013',
UP: '\uE013',
ARROW_RIGHT: '\uE014',
RIGHT: '\uE014',
ARROW_DOWN: '\uE015',
DOWN: '\uE015',
INSERT: '\uE016',
DELETE: '\uE017',
SEMICOLON: '\uE018',
EQUALS: '\uE019',
NUMPAD0: '\uE01A', // number pad keys
NUMPAD1: '\uE01B',
NUMPAD2: '\uE01C',
NUMPAD3: '\uE01D',
NUMPAD4: '\uE01E',
NUMPAD5: '\uE01F',
NUMPAD6: '\uE020',
NUMPAD7: '\uE021',
NUMPAD8: '\uE022',
NUMPAD9: '\uE023',
MULTIPLY: '\uE024',
ADD: '\uE025',
SEPARATOR: '\uE026',
SUBTRACT: '\uE027',
DECIMAL: '\uE028',
DIVIDE: '\uE029',
F1: '\uE031', // function keys
F2: '\uE032',
F3: '\uE033',
F4: '\uE034',
F5: '\uE035',
F6: '\uE036',
F7: '\uE037',
F8: '\uE038',
F9: '\uE039',
F10: '\uE03A',
F11: '\uE03B',
F12: '\uE03C',
COMMAND: '\uE03D', // Apple command key
META: '\uE03D' // alias for Windows key
};
/**
* Simulate pressing many keys at once in a "chord". Takes a sequence of
* {@linkplain Key keys} or strings, appends each of the values to a string,
* adds the chord termination key ({@link Key.NULL}) and returns the resulting
* string.
*
* Note: when the low-level webdriver key handlers see Keys.NULL, active
* modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event.
*
* @param {...string} var_args The key sequence to concatenate.
* @return {string} The null-terminated key sequence.
*/
Key.chord = function(var_args) {
return Array.prototype.slice.call(arguments, 0).join('') + Key.NULL;
};
/**
* Used with {@link ./webelement.WebElement#sendKeys WebElement#sendKeys} on
* file input elements (`<input type="file">`) to detect when the entered key
* sequence defines the path to a file.
*
* By default, {@linkplain ./webelement.WebElement WebElement's} will enter all
* key sequences exactly as entered. You may set a
* {@linkplain ./webdriver.WebDriver#setFileDetector file detector} on the
* parent WebDriver instance to define custom behavior for handling file
* elements. Of particular note is the
* {@link selenium-webdriver/remote.FileDetector}, which should be used when
* running against a remote
* [Selenium Server](http://docs.seleniumhq.org/download/).
*/
class FileDetector {
/**
* Handles the file specified by the given path, preparing it for use with
* the current browser. If the path does not refer to a valid file, it will
* be returned unchanged, otherwise a path suitable for use with the current
* browser will be returned.
*
* This default implementation is a no-op. Subtypes may override this function
* for custom tailored file handling.
*
* @param {!./webdriver.WebDriver} driver The driver for the current browser.
* @param {string} path The path to process.
* @return {!Promise<string>} A promise for the processed file path.
* @package
*/
handleFile(driver, path) {
return Promise.resolve(path);
}
}
// PUBLIC API
module.exports = {
Button: Button,
Key: Key,
FileDetector: FileDetector
};

676
node_modules/selenium-webdriver/lib/logging.js generated vendored Normal file
View file

@ -0,0 +1,676 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* @fileoverview Defines WebDriver's logging system. The logging system is
* broken into major components: local and remote logging.
*
* The local logging API, which is anchored by the {@linkplain Logger} class is
* similar to Java's logging API. Loggers, retrieved by
* {@linkplain #getLogger getLogger(name)}, use hierarchical, dot-delimited
* namespaces (e.g. "" > "webdriver" > "webdriver.logging"). Recorded log
* messages are represented by the {@linkplain Entry} class. You can capture log
* records by {@linkplain Logger#addHandler attaching} a handler function to the
* desired logger. For convenience, you can quickly enable logging to the
* console by simply calling {@linkplain #installConsoleHandler
* installConsoleHandler}.
*
* The [remote logging API](https://github.com/SeleniumHQ/selenium/wiki/Logging)
* allows you to retrieve logs from a remote WebDriver server. This API uses the
* {@link Preferences} class to define desired log levels prior to creating
* a WebDriver session:
*
* var prefs = new logging.Preferences();
* prefs.setLevel(logging.Type.BROWSER, logging.Level.DEBUG);
*
* var caps = Capabilities.chrome();
* caps.setLoggingPrefs(prefs);
* // ...
*
* Remote log entries, also represented by the {@link Entry} class, may be
* retrieved via {@link webdriver.WebDriver.Logs}:
*
* driver.manage().logs().get(logging.Type.BROWSER)
* .then(function(entries) {
* entries.forEach(function(entry) {
* console.log('[%s] %s', entry.level.name, entry.message);
* });
* });
*
* **NOTE:** Only a few browsers support the remote logging API (notably
* Firefox and Chrome). Firefox supports basic logging functionality, while
* Chrome exposes robust
* [performance logging](https://sites.google.com/a/chromium.org/chromedriver/logging)
* options. Remote logging is still considered a non-standard feature, and the
* APIs exposed by this module for it are non-frozen. This module will be
* updated, possibly breaking backwards-compatibility, once logging is
* officially defined by the
* [W3C WebDriver spec](http://www.w3.org/TR/webdriver/).
*/
/**
* Defines a message level that may be used to control logging output.
*
* @final
*/
class Level {
/**
* @param {string} name the level's name.
* @param {number} level the level's numeric value.
*/
constructor(name, level) {
if (level < 0) {
throw new TypeError('Level must be >= 0');
}
/** @private {string} */
this.name_ = name;
/** @private {number} */
this.value_ = level;
}
/** This logger's name. */
get name() {
return this.name_;
}
/** The numeric log level. */
get value() {
return this.value_;
}
/** @override */
toString() {
return this.name;
}
}
/**
* Indicates no log messages should be recorded.
* @const
*/
Level.OFF = new Level('OFF', Infinity);
/**
* Log messages with a level of `1000` or higher.
* @const
*/
Level.SEVERE = new Level('SEVERE', 1000);
/**
* Log messages with a level of `900` or higher.
* @const
*/
Level.WARNING = new Level('WARNING', 900);
/**
* Log messages with a level of `800` or higher.
* @const
*/
Level.INFO = new Level('INFO', 800);
/**
* Log messages with a level of `700` or higher.
* @const
*/
Level.DEBUG = new Level('DEBUG', 700);
/**
* Log messages with a level of `500` or higher.
* @const
*/
Level.FINE = new Level('FINE', 500);
/**
* Log messages with a level of `400` or higher.
* @const
*/
Level.FINER = new Level('FINER', 400);
/**
* Log messages with a level of `300` or higher.
* @const
*/
Level.FINEST = new Level('FINEST', 300);
/**
* Indicates all log messages should be recorded.
* @const
*/
Level.ALL = new Level('ALL', 0);
const ALL_LEVELS = /** !Set<Level> */new Set([
Level.OFF,
Level.SEVERE,
Level.WARNING,
Level.INFO,
Level.DEBUG,
Level.FINE,
Level.FINER,
Level.FINEST,
Level.ALL
]);
const LEVELS_BY_NAME = /** !Map<string, !Level> */ new Map([
[Level.OFF.name, Level.OFF],
[Level.SEVERE.name, Level.SEVERE],
[Level.WARNING.name, Level.WARNING],
[Level.INFO.name, Level.INFO],
[Level.DEBUG.name, Level.DEBUG],
[Level.FINE.name, Level.FINE],
[Level.FINER.name, Level.FINER],
[Level.FINEST.name, Level.FINEST],
[Level.ALL.name, Level.ALL]
]);
/**
* Converts a level name or value to a {@link Level} value. If the name/value
* is not recognized, {@link Level.ALL} will be returned.
*
* @param {(number|string)} nameOrValue The log level name, or value, to
* convert.
* @return {!Level} The converted level.
*/
function getLevel(nameOrValue) {
if (typeof nameOrValue === 'string') {
return LEVELS_BY_NAME.get(nameOrValue) || Level.ALL;
}
if (typeof nameOrValue !== 'number') {
throw new TypeError('not a string or number');
}
for (let level of ALL_LEVELS) {
if (nameOrValue >= level.value) {
return level;
}
}
return Level.ALL;
}
/**
* Describes a single log entry.
*
* @final
*/
class Entry {
/**
* @param {(!Level|string|number)} level The entry level.
* @param {string} message The log message.
* @param {number=} opt_timestamp The time this entry was generated, in
* milliseconds since 0:00:00, January 1, 1970 UTC. If omitted, the
* current time will be used.
* @param {string=} opt_type The log type, if known.
*/
constructor(level, message, opt_timestamp, opt_type) {
this.level = level instanceof Level ? level : getLevel(level);
this.message = message;
this.timestamp =
typeof opt_timestamp === 'number' ? opt_timestamp : Date.now();
this.type = opt_type || '';
}
/**
* @return {{level: string, message: string, timestamp: number,
* type: string}} The JSON representation of this entry.
*/
toJSON() {
return {
'level': this.level.name,
'message': this.message,
'timestamp': this.timestamp,
'type': this.type
};
}
}
/** @typedef {(string|function(): string)} */
let Loggable;
/**
* An object used to log debugging messages. Loggers use a hierarchical,
* dot-separated naming scheme. For instance, "foo" is considered the parent of
* the "foo.bar" and an ancestor of "foo.bar.baz".
*
* Each logger may be assigned a {@linkplain #setLevel log level}, which
* controls which level of messages will be reported to the
* {@linkplain #addHandler handlers} attached to this instance. If a log level
* is not explicitly set on a logger, it will inherit its parent.
*
* This class should never be directly instantiated. Instead, users should
* obtain logger references using the {@linkplain ./logging.getLogger()
* getLogger()} function.
*
* @final
*/
class Logger {
/**
* @param {string} name the name of this logger.
* @param {Level=} opt_level the initial level for this logger.
*/
constructor(name, opt_level) {
/** @private {string} */
this.name_ = name;
/** @private {Level} */
this.level_ = opt_level || null;
/** @private {Logger} */
this.parent_ = null;
/** @private {Set<function(!Entry)>} */
this.handlers_ = null;
}
/** @return {string} the name of this logger. */
getName() {
return this.name_;
}
/**
* @param {Level} level the new level for this logger, or `null` if the logger
* should inherit its level from its parent logger.
*/
setLevel(level) {
this.level_ = level;
}
/** @return {Level} the log level for this logger. */
getLevel() {
return this.level_;
}
/**
* @return {!Level} the effective level for this logger.
*/
getEffectiveLevel() {
let logger = this;
let level;
do {
level = logger.level_;
logger = logger.parent_;
} while (logger && !level);
return level || Level.OFF;
}
/**
* @param {!Level} level the level to check.
* @return {boolean} whether messages recorded at the given level are loggable
* by this instance.
*/
isLoggable(level) {
return level.value !== Level.OFF.value
&& level.value >= this.getEffectiveLevel().value;
}
/**
* Adds a handler to this logger. The handler will be invoked for each message
* logged with this instance, or any of its descendants.
*
* @param {function(!Entry)} handler the handler to add.
*/
addHandler(handler) {
if (!this.handlers_) {
this.handlers_ = new Set;
}
this.handlers_.add(handler);
}
/**
* Removes a handler from this logger.
*
* @param {function(!Entry)} handler the handler to remove.
* @return {boolean} whether a handler was successfully removed.
*/
removeHandler(handler) {
if (!this.handlers_) {
return false;
}
return this.handlers_.delete(handler);
}
/**
* Logs a message at the given level. The message may be defined as a string
* or as a function that will return the message. If a function is provided,
* it will only be invoked if this logger's
* {@linkplain #getEffectiveLevel() effective log level} includes the given
* `level`.
*
* @param {!Level} level the level at which to log the message.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
log(level, loggable) {
if (!this.isLoggable(level)) {
return;
}
let message = '[' + this.name_ + '] '
+ (typeof loggable === 'function' ? loggable() : loggable);
let entry = new Entry(level, message, Date.now());
for (let logger = this; !!logger; logger = logger.parent_) {
if (logger.handlers_) {
for (let handler of logger.handlers_) {
handler(entry);
}
}
}
}
/**
* Logs a message at the {@link Level.SEVERE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
severe(loggable) {
this.log(Level.SEVERE, loggable);
}
/**
* Logs a message at the {@link Level.WARNING} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
warning(loggable) {
this.log(Level.WARNING, loggable);
}
/**
* Logs a message at the {@link Level.INFO} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
info(loggable) {
this.log(Level.INFO, loggable);
}
/**
* Logs a message at the {@link Level.DEBUG} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
debug(loggable) {
this.log(Level.DEBUG, loggable);
}
/**
* Logs a message at the {@link Level.FINE} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
fine(loggable) {
this.log(Level.FINE, loggable);
}
/**
* Logs a message at the {@link Level.FINER} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finer(loggable) {
this.log(Level.FINER, loggable);
}
/**
* Logs a message at the {@link Level.FINEST} log level.
* @param {(string|function(): string)} loggable the message to log, or a
* function that will return the message.
*/
finest(loggable) {
this.log(Level.FINEST, loggable);
}
}
/**
* Maintains a collection of loggers.
*
* @final
*/
class LogManager {
constructor() {
/** @private {!Map<string, !Logger>} */
this.loggers_ = new Map;
this.root_ = new Logger('', Level.OFF);
}
/**
* Retrieves a named logger, creating it in the process. This function will
* implicitly create the requested logger, and any of its parents, if they
* do not yet exist.
*
* @param {string} name the logger's name.
* @return {!Logger} the requested logger.
*/
getLogger(name) {
if (!name) {
return this.root_;
}
let parent = this.root_;
for (let i = name.indexOf('.'); i != -1; i = name.indexOf('.', i + 1)) {
let parentName = name.substr(0, i);
parent = this.createLogger_(parentName, parent);
}
return this.createLogger_(name, parent);
}
/**
* Creates a new logger.
*
* @param {string} name the logger's name.
* @param {!Logger} parent the logger's parent.
* @return {!Logger} the new logger.
* @private
*/
createLogger_(name, parent) {
if (this.loggers_.has(name)) {
return /** @type {!Logger} */(this.loggers_.get(name));
}
let logger = new Logger(name, null);
logger.parent_ = parent;
this.loggers_.set(name, logger);
return logger;
}
}
const logManager = new LogManager;
/**
* Retrieves a named logger, creating it in the process. This function will
* implicitly create the requested logger, and any of its parents, if they
* do not yet exist.
*
* The log level will be unspecified for newly created loggers. Use
* {@link Logger#setLevel(level)} to explicitly set a level.
*
* @param {string} name the logger's name.
* @return {!Logger} the requested logger.
*/
function getLogger(name) {
return logManager.getLogger(name);
}
/**
* Pads a number to ensure it has a minimum of two digits.
*
* @param {number} n the number to be padded.
* @return {string} the padded number.
*/
function pad(n) {
if (n >= 10) {
return '' + n;
} else {
return '0' + n;
}
}
/**
* Logs all messages to the Console API.
* @param {!Entry} entry the entry to log.
*/
function consoleHandler(entry) {
if (typeof console === 'undefined' || !console) {
return;
}
var timestamp = new Date(entry.timestamp);
var msg =
'[' + timestamp.getUTCFullYear() + '-' +
pad(timestamp.getUTCMonth() + 1) + '-' +
pad(timestamp.getUTCDate()) + 'T' +
pad(timestamp.getUTCHours()) + ':' +
pad(timestamp.getUTCMinutes()) + ':' +
pad(timestamp.getUTCSeconds()) + 'Z] ' +
'[' + entry.level.name + '] ' +
entry.message;
var level = entry.level.value;
if (level >= Level.SEVERE.value) {
console.error(msg);
} else if (level >= Level.WARNING.value) {
console.warn(msg);
} else {
console.log(msg);
}
}
/**
* Adds the console handler to the given logger. The console handler will log
* all messages using the JavaScript Console API.
*
* @param {Logger=} opt_logger The logger to add the handler to; defaults
* to the root logger.
*/
function addConsoleHandler(opt_logger) {
let logger = opt_logger || logManager.root_;
logger.addHandler(consoleHandler);
}
/**
* Removes the console log handler from the given logger.
*
* @param {Logger=} opt_logger The logger to remove the handler from; defaults
* to the root logger.
* @see exports.addConsoleHandler
*/
function removeConsoleHandler(opt_logger) {
let logger = opt_logger || logManager.root_;
logger.removeHandler(consoleHandler);
}
/**
* Installs the console log handler on the root logger.
*/
function installConsoleHandler() {
addConsoleHandler(logManager.root_);
}
/**
* Common log types.
* @enum {string}
*/
const Type = {
/** Logs originating from the browser. */
BROWSER: 'browser',
/** Logs from a WebDriver client. */
CLIENT: 'client',
/** Logs from a WebDriver implementation. */
DRIVER: 'driver',
/** Logs related to performance. */
PERFORMANCE: 'performance',
/** Logs from the remote server. */
SERVER: 'server'
};
/**
* Describes the log preferences for a WebDriver session.
*
* @final
*/
class Preferences {
constructor() {
/** @private {!Map<string, !Level>} */
this.prefs_ = new Map;
}
/**
* Sets the desired logging level for a particular log type.
* @param {(string|Type)} type The log type.
* @param {(!Level|string|number)} level The desired log level.
* @throws {TypeError} if `type` is not a `string`.
*/
setLevel(type, level) {
if (typeof type !== 'string') {
throw TypeError('specified log type is not a string: ' + typeof type);
}
this.prefs_.set(type, level instanceof Level ? level : getLevel(level));
}
/**
* Converts this instance to its JSON representation.
* @return {!Object<string, string>} The JSON representation of this set of
* preferences.
*/
toJSON() {
let json = {};
for (let key of this.prefs_.keys()) {
json[key] = this.prefs_.get(key).name;
}
return json;
}
}
// PUBLIC API
module.exports = {
Entry: Entry,
Level: Level,
LogManager: LogManager,
Logger: Logger,
Preferences: Preferences,
Type: Type,
addConsoleHandler: addConsoleHandler,
getLevel: getLevel,
getLogger: getLogger,
installConsoleHandler: installConsoleHandler,
removeConsoleHandler: removeConsoleHandler
};

3404
node_modules/selenium-webdriver/lib/promise.js generated vendored Normal file

File diff suppressed because it is too large Load diff

80
node_modules/selenium-webdriver/lib/session.js generated vendored Normal file
View file

@ -0,0 +1,80 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
const {Capabilities} = require('./capabilities');
/**
* Contains information about a single WebDriver session.
*/
class Session {
/**
* @param {string} id The session ID.
* @param {!(Object|Capabilities)} capabilities The session
* capabilities.
*/
constructor(id, capabilities) {
/** @private {string} */
this.id_ = id;
/** @private {!Capabilities} */
this.caps_ = capabilities instanceof Capabilities
? /** @type {!Capabilities} */(capabilities)
: new Capabilities(capabilities);
}
/**
* @return {string} This session's ID.
*/
getId() {
return this.id_;
}
/**
* @return {!Capabilities} This session's capabilities.
*/
getCapabilities() {
return this.caps_;
}
/**
* Retrieves the value of a specific capability.
* @param {string} key The capability to retrieve.
* @return {*} The capability value.
*/
getCapability(key) {
return this.caps_.get(key);
}
/**
* Returns the JSON representation of this object, which is just the string
* session ID.
* @return {string} The JSON representation of this Session.
*/
toJSON() {
return this.getId();
}
}
// PUBLIC API
module.exports = {Session: Session};

38
node_modules/selenium-webdriver/lib/symbols.js generated vendored Normal file
View file

@ -0,0 +1,38 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
/**
* @fileoverview Defines well-known symbols used within the selenium-webdriver
* library.
*/
module.exports = {
/**
* The serialize symbol specifies a method that returns an object's serialized
* representation. If an object's serialized form is not immediately
* available, the serialize method will return a promise that will be resolved
* with the serialized form.
*
* Note that the described method is analogous to objects that define a
* `toJSON()` method, except the serialized result may be a promise, or
* another object with a promised property.
*/
serialize: Symbol('serialize')
};

151
node_modules/selenium-webdriver/lib/test/build.js generated vendored Normal file
View file

@ -0,0 +1,151 @@
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
'use strict';
const spawn = require('child_process').spawn,
fs = require('fs'),
path = require('path');
const isDevMode = require('../devmode');
var projectRoot = path.normalize(path.join(__dirname, '../../../../..'));
function checkIsDevMode() {
if (!isDevMode) {
throw Error('Cannot execute build; not running in dev mode');
}
}
/**
* Targets that have been previously built.
* @type {!Object}
*/
var builtTargets = {};
/**
* @param {!Array.<string>} targets The targets to build.
* @throws {Error} If not running in dev mode.
* @constructor
*/
var Build = function(targets) {
checkIsDevMode();
this.targets_ = targets;
};
/** @private {boolean} */
Build.prototype.cacheResults_ = false;
/**
* Configures this build to only execute if it has not previously been
* run during the life of the current process.
* @return {!Build} A self reference.
*/
Build.prototype.onlyOnce = function() {
this.cacheResults_ = true;
return this;
};
/**
* Executes the build.
* @return {!Promise} A promise that will be resolved when
* the build has completed.
* @throws {Error} If no targets were specified.
*/
Build.prototype.go = function() {
var targets = this.targets_;
if (!targets.length) {
throw Error('No targets specified');
}
// Filter out cached results.
if (this.cacheResults_) {
targets = targets.filter(function(target) {
return !builtTargets.hasOwnProperty(target);
});
if (!targets.length) {
return Promise.resolve();
}
}
console.log('\nBuilding', targets.join(' '), '...');
var cmd, args = targets;
if (process.platform === 'win32') {
cmd = 'cmd.exe';
args.unshift('/c', path.join(projectRoot, 'go.bat'));
} else {
cmd = path.join(projectRoot, 'go');
}
return new Promise((resolve, reject) => {
spawn(cmd, args, {
cwd: projectRoot,
env: process.env,
stdio: ['ignore', process.stdout, process.stderr]
}).on('exit', function(code, signal) {
if (code === 0) {
targets.forEach(function(target) {
builtTargets[target] = 1;
});
return resolve();
}
var msg = 'Unable to build artifacts';
if (code) { // May be null.
msg += '; code=' + code;
}
if (signal) {
msg += '; signal=' + signal;
}
reject(Error(msg));
});
});
};
// PUBLIC API
/**
* Creates a build of the listed targets.
* @param {...string} var_args The targets to build.
* @return {!Build} The new build.
* @throws {Error} If not running in dev mode.
*/
exports.of = function(var_args) {
var targets = Array.prototype.slice.call(arguments, 0);
return new Build(targets);
};
/**
* @return {string} Absolute path of the project's root directory.
* @throws {Error} If not running in dev mode.
*/
exports.projectRoot = function() {
checkIsDevMode();
return projectRoot;
};

View file

@ -0,0 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ClickTest_testClicksASurroundingStrongTag</title>
</head>
<body>
<div>
<a href="xhtmlTest.html"><strong>Click</strong></a>
</div>
</body>
</html>

View file

@ -0,0 +1,17 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Page.aspx.cs" Inherits="Page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<a href="../xhtmlTest.html" target="_top">top</a>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

View file

@ -0,0 +1,22 @@
using System;
using System.Threading;
public partial class Page : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/html";
int lastIndex = Request.PathInfo.LastIndexOf("/");
string pageNumber = (lastIndex == -1 ? "Unknown" : Request.PathInfo.Substring(lastIndex + 1));
if (!string.IsNullOrEmpty(Request.QueryString["pageNumber"]))
{
pageNumber = Request.QueryString["pageNumber"];
}
Response.Output.Write("<html><head><title>Page" + pageNumber + "</title></head>");
Response.Output.Write("<body>Page number <span id=\"pageNumber\">");
Response.Output.Write(pageNumber);
//Response.Output.Write("<script>var s=''; for (var i in window) {s += i + ' -> ' + window[i] + '<p>';} document.write(s);</script>")'
Response.Output.Write("</span></body></html>");
}
}

View file

@ -0,0 +1,11 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Redirect.aspx.cs" Inherits="Redirect" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,9 @@
using System;
public partial class Redirect : Page
{
protected new void Page_Load(object sender, EventArgs e)
{
Response.Redirect("resultPage.html");
}
}

View file

@ -0,0 +1,759 @@
<StyleCopSettings Version="4.3">
<Analyzers>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustMeetMinimumCharacterLength">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AllAccessorsMustBeMultiLineOrSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeadersMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleBlankLinesInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="WhileDoFooterMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationHeaderMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentMustBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeAnalysisSuppressionMustHaveJustification">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugAssertMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DebugFailMustProvideMessageText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotUseUnnecessaryParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConditionalExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveDelegateParenthesisWhenPossible">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="RemoveUnnecessaryCode">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.NamingRules">
<Rules>
<Rule Name="ElementMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InterfaceNamesMustBeginWithI">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstFieldNamesMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotUseHungarianNotation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustBeginWithLowerCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VariableNamesMustNotBePrefixed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotBeginWithUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldNamesMustNotContainUnderscore">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstantsMustAppearBeforeFields">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StaticElementsMustAppearBeforeInstanceElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DeclarationKeywordsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ProtectedMustComeBeforeInternal">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertyAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EventAccessorsMustFollowOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CommentsMustContainText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPrefixCallsWithBaseUnlessLocalImplementationExists">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeOnDeclarationLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfLastParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeOnLineOfOpeningParenthesis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommaMustBeOnSameLineAsPreviousParameter">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterListMustFollowDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustNotSpanMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustFollowPreviousClause">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesMustBeOnSeparateLinesOrAllOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClauseMustBeginOnNewLineWhenPreviousClauseSpansMultipleLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="QueryClausesSpanningMultipleLinesMustBeginOnOwnLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DoNotPlaceRegionsWithinElements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainEmptyStatements">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedComments">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="BlockStatementsMustNotContainEmbeddedRegions">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseBuiltInTypeAlias">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="KeywordsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CommasMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SemicolonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationLinesMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustBeginWithSingleSpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PreprocessorKeywordsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OperatorKeywordMustBeFollowedBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingSquareBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingCurlyBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingGenericBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="OpeningAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ClosingAttributeBracketsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NullableTypeSymbolsMustNotBePrecededBySpace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="MemberAccessSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncrementDecrementSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="NegativeSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PositiveSignsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DereferenceAndAccessOfSymbolsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ColonsMustBeSpacedCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainMultipleWhitespaceInARow">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View file

@ -0,0 +1,59 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" defaultLanguage="c#" targetFramework="4.0"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
<!--urlMappings enabled="true">
<add url="~/redirect" mappedUrl="~/Redirect.aspx" />
</urlMappings-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
</modules>
</system.webServer>
<rewriter>
<rewrite url="~/redirect" to="~/Redirect.aspx"/>
<rewrite url="~/page/([0-9]+)$" to="~/Page.aspx?pageNumber=$1"/>
<rewrite url="~/page/([0-9]+)(\?)(.*)" to="~/Page.aspx?pageNumber=$1&amp;$3"/>
</rewriter>
</configuration>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Title
</title>
</head>
<body>
<p>
<a href="/foo">Foo</a>
</p>
</body>
</html>

View file

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html>
<body>
<form action="javascript:updateDom()">
<label for="typer">New label text:</label>
<input name="typer" type="text"/>
<br/>
<label for="color">Select label color:</label>
<input name="color" id="red" value="red" type="radio"/>Red
<input name="color" id="green" value="green" type="radio"/>Green
<br/>
<input name="submit" type="submit" value="Add Label"/>
</form>
<div id="update_butter" style="display:none"></div>
<script>
var butter = document.getElementById('update_butter');
var textProperty = butter['innerText'] ? 'innerText' : 'textContent';
var listeners = [];
function registerListener(fn) {
listeners.push(fn);
}
function updateDom() {
butter.style.display = 'block';
butter[textProperty] = 'Updating';
disableForm();
tick();
}
function disableForm() {
var inputs = document.getElementsByTagName('input');
for (var i = 0, input; input = inputs[i]; ++i) {
input.disabled = true;
}
}
function enableForm() {
var inputs = document.getElementsByTagName('input');
for (var i = 0, input; input = inputs[i]; ++i) {
input.disabled = false;
}
}
function tick() {
var length = butter[textProperty].substring('Updating'.length).length;
if (length != 10) {
butter[textProperty] += '.';
window.setTimeout(tick, 500);
} else {
enableForm();
var div = document.createElement('div');
var colors = document.forms[0].color;
for (var i = 0, color; color = colors[i]; ++i) {
if (color.checked) {
div.style.backgroundColor = color.value;
break;
}
}
div[textProperty] = document.forms[0].typer.value;
div.className = 'label';
document.forms[0].typer.value = '';
document.body.appendChild(div);
butter[textProperty] = 'Done!';
window.setTimeout(function() {
while (listeners.length) {
try {
listeners.shift()(div[textProperty]);
} catch (e) {
butter[textProperty] = "Exception seen: " + e;
}
}
}, 500);
}
}
</script>
</body>
</html>

View file

@ -0,0 +1,85 @@
<html>
<!-- Padding to account for small screens of mobile devices -->
<style>
p {margin-top:48px;}
</style>
<head>
<title>Testing Alerts</title>
<script type="text/javascript">
function setInnerText(id, value) {
document.getElementById(id).innerHTML = '<p>' + value + '</p>';
}
function displayPrompt() {
setInnerText('text', prompt('Enter something'));
}
function displayPromptWithDefault() {
setInnerText('text', prompt('Enter something', 'This is a default value'));
}
function displayTwoPrompts() {
setInnerText('text1', prompt('First'));
setInnerText('text2', prompt('Second'));
}
function slowAlert() {
window.setTimeout(function() {
alert('Slow');
}, 200);
}
</script>
</head>
<body>
<h1>Testing Alerts and Stuff</h1>
<p>This tests alerts: <a href="#" id="alert" onclick="alert('cheese');">click me</a></p>
<p>This tests alerts: <a href="#" id="empty-alert" onclick="alert('');">click me</a></p>
<p>Let's make the <a href="#" id="prompt" onclick="displayPrompt();">prompt happen</a></p>
<p>Let's make the <a href="#" id="prompt-with-default" onclick="displayPromptWithDefault();">prompt with default happen</a></p>
<p>Let's make TWO <a href="#" id="double-prompt" onclick="displayTwoPrompts();">prompts happen</a></p>
<p>A <a href="#" id="slow-alert" onclick="slowAlert();">SLOW</a> alert</p>
<p>This is a test of a confirm:
<a href="simpleTest.html" id="confirm" onclick="return confirm('Are you sure?');">test confirm</a></p>
<p>This is a test of showModalDialog: <a href="#" id="dialog" onclick="showModalDialog('javascriptPage.html')">test dialog</a></p>
<p>This is a test of an alert in an iframe:
<iframe src="iframeWithAlert.html" name="iframeWithAlert"></iframe>
</p>
<p>This is a test of an alert in a nested iframe:
<iframe src="iframeWithIframe.html" name="iframeWithIframe"></iframe>
</p>
<p>This is a test of an alert open from onload event handler: <a id="open-page-with-onload-alert" href="pageWithOnLoad.html">open new page</a></p>
<p>This is a test of an alert open from onload event handler: <a id="open-window-with-onload-alert" href="pageWithOnLoad.html" target="onload">open new window</a></p>
<p>This is a test of an alert open from onunload event handler: <a id="open-page-with-onunload-alert" href="pageWithOnUnload.html">open new page</a></p>
<p>This is a test of an alert open from onclose event handler: <a id="open-window-with-onclose-alert" href="pageWithOnUnload.html" target="onclose">open new window</a></p>
<p>This is a test of an alert open from onclose event handler: <a id="open-new-window" href="blank.html" target="newwindow">open new window</a></p>
<div id="text"></div>
<div id="text1"></div>
<div id="text2"></div>
<p><select id="select" onchange="alert('changed');">
<option id="novalue" value="">Nothing selected</option>
<option id="value1" value="1">One</option>
<option id="value2" value="2">Two</option>
<option id="value3" value="3">Three</option>
</select></p>
<p><input id="input" onchange="alert('change fired');" value="onchange"/></p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
node_modules/selenium-webdriver/lib/test/data/beach.jpg generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1 @@
<html><head><title>blank</title></head><body></body></html>

View file

@ -0,0 +1,41 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Testing Typing into body</title>
<script type="text/javascript">
function appendMessage(message) {
document.getElementById('result').innerHTML += message + " ";
}
function appendMessageFromBody(message) {
document.getElementById('body_result').innerHTML += message + " ";
}
</script>
</head>
<body onkeypress="appendMessageFromBody('keypress')">
<h1>Type Stuff</h1>
<div id="result">
&nbsp;
</div>
<div id="body_result">
&nbsp;
</div>
<!-- Textbox - to confuse some browsers. -->
<form action="resultPage.html" id="on-form">
<input id="intext"
onfocus="appendMessage('focus')"
onkeydown="appendMessage('keydown')"
onkeypress="appendMessage('keypress')"
onkeyup="appendMessage('keyup')"
onblur="appendMessage('blur')"
onchange="appendMessage('change')"
/>
</form>
</body>

View file

@ -0,0 +1,19 @@
<html>
<head>
<title>Elements with boolean attributes</title>
</head>
<body>
<form method="get" action="resultPage.html" name="required">
<input type="text" id="working"/>
<input type="email" id="emailRequired" required/>
<input type="text" id="inputRequired" value="Example text" required=""/>
<textarea id="textAreaRequired" rows="5" cols="5" required="false">Example text</textarea>
<textarea id="emptyTextAreaRequired" rows="5" cols="5" required="required"></textarea>
</form>
<!-- Empty div to test GetAttribute -->
<div id="wallace" class="gromit"></div>
<!-- Div to test boolean attributes -->
<div id="unwrappable" nowrap>Unwrappable text</div>
</body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head>
<title>Depth one child page</title>
</head>
<body>
<p>I'm a page in a child directory</p>
</body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head>
<title>Depth two child page</title>
</head>
<body>
<p>I'm a page in a grandchild directory! How cute!</p>
</body>
</html>

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Testing click events</title>
<script type="text/javascript">
function displayEvent(event) {
var keys = ['x', 'y', 'clientX', 'clientY', 'pageX', 'pageY', 'screenX', 'screenY', 'shiftKey', 'ctrlKey'];
var message = "<ul>";
for (var i = 0; i < keys.length; i++) {
message += "<li>" + keys[i] + ": <span id='" + keys[i] + "'>" + event[keys[i]] + "</span></li>";
}
message += "</ul>";
document.getElementById('result').innerHTML = message;
}
</script>
</head>
<body>
<div id="eventish" onclick="displayEvent(event);">
Click me to view my coordinates
</div>
<div id="result" style="width:300;height:60">
<p>&nbsp;</p>
</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<html>
<head>
<title>click frames</title>
</head>
<frameset rows="*" border="1">
<frame src="clicks.html" name="source" scrolling="NO" noresize>
<frame src="xhtmlTest.html" name="target">
</frameset>
</frameset>
</html>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>click-jacking</title>
<script>
var clickJacker;
function setOpacity(opacity) {
var matches = window.navigator.userAgent.match(/MSIE\s*(\d*)/);
if (matches && matches.length > 1 && parseInt(matches[1]) <= 8) {
clickJacker.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
} else {
clickJacker.style.opacity = opacity;
}
}
function init() {
clickJacker = document.getElementById('clickJacker');
setOpacity(0);
}
</script>
</head>
<body onload="init()">
<div>
<div id="clickJacker"
onclick="setOpacity(1);"
style="position:absolute;float:left;
width:200px;height:100px; padding:10px;
background-color:darkred;
border:1px solid darkred;">Click jacked!</div>
<div style="width:200px; height:100px;
border:1px solid black; padding:10px">Click Me</div>
<script>
clickJacker = document.getElementById('clickJacker');
</script>
</div>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<td>
<div style="width:752px;"></div>
</td>
<td>
<div style="width:350px; text-align: center;">
<form onsubmit="return false;" method="get">
<input id="button" value="Click me" type="submit">
</form>
</div>
</td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<body>
<div style="height: 100px; overflow: auto;">
<table>
<tbody>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td>data</td></tr>
<tr><td><a href="#clicked" id="link">click me</a></td></tr>
</tbody>
</table>
</div>
</body></html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RTL test</title>
<style type="text/css">
.test { font-size: 150%; }
table td { border: 1px solid #CCC; }
img { margin: 10px; }
</style>
</head>
<body>
<div dir="rtl">
<div class="test">مفتاح<a href="clicks.html" id="ar_link"> معايير</a> الويب</div>
<div class="test">פעילות<a id="hb_link" href="clicks.html"> הבינאום </a></div>
</div>
</body></html>

View file

@ -0,0 +1,18 @@
<html>
<head>
<title>Click Source</title>
</head>
<body>
<a href="simpleTest.html" target="target" id="otherframe">I go to a target</a>
</body>
</html>
<html>
<head>
<title>Click Source</title>
</head>
<body>
<a href="simpleTest.html" target="target" id="otherframe">I go to a target</a>
</body>
</html>

View file

@ -0,0 +1,6 @@
<html>
<head>
<title>click iframe</title>
</head>
<body><a id="link" href="submitted_page.html" target="_top">Click me</a></body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head>
<title>click in iframe</title>
</head>
<body>
<iframe id="ifr" src="click_iframe.html" style="margin: 200px; width: 100px; height: 50px;" />
</body>
</html>

View file

@ -0,0 +1,62 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>An element that disappears on click</title>
<style>
#under {
position: absolute;
top: 20;
left: 20;
width: 100px;
height: 100px;
background-color: white;
}
#over {
position: absolute;
top: 20;
left: 20;
width: 100px;
height: 100px;
background-color: red;
opacity: 0.5;
}
#log {
position: absolute;
top: 120px;
}
</style>
</head>
<body id="body">
<div id="under"><p id="contents">Hello</p></div>
<div id="over"></div>
<div id="log">
<p>Log:<p>
</div>
<script>
var byId = document.getElementById.bind(document);
var log = byId("log");
function handler(ev) {
log.innerHTML += "<p></p>";
log.lastElementChild.textContent = ev.type + " in " + ev.target.id + " (handled by " + ev.currentTarget.id + ")\n";
}
var under = byId("under");
var over = byId("over");
var body = document.body;
var types = ["click", "mousedown", "mouseup"];
for (var i = 0, type; (type = types[i]); ++i) {
under.addEventListener(type, handler);
over.addEventListener(type, handler);
body.addEventListener(type, handler);
}
over.addEventListener("mousedown", function () {
over.style.display = "none";
})
</script>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Google Image Map</title>
</head>
<body>
<h1>Google Image Map</h1>
<img id="google_logo" src="google_map.png" usemap="#google_map" border="0" width="364" height="126"/>
<map id="google_map" name="google_map">
<area id="rectG" shape="rect" coords="0,0,90,100" href="mapped_page1.html" alt="area 1"/>
<area id="circleO" shape="circle" coords="120,60,30" href="mapped_page2.html" alt="area 2"/>
<area id="polyLE" shape="poly" coords="280,0,310,0,360,30,360,90,280,90" href="mapped_page3.html" alt="area 3"/>
</map>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Submit Buttons</title>
</head>
<body>
<form id="form1" action="submitted_page.html">
<label for="name">Enter your name: </label><input type="text" name="name" id="name"/>
<button id="internal_explicit_submit" type="submit">Explicit Submit</button>
<button id="internal_implicit_submit">Implicit Submit</button>
<button type="submit"><span id="internal_span_submit">Spanned Submit</span></button>
</form>
<button id="external_explicit_submit" type="submit" form="form1">Explicit Submit</button>
<button id="external_implicit_submit" form="form1">Implicit Submit</button>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Sample page for issue 5237</title>
</head>
<body>
<iframe id="search" src="issue5237_frame.html"></iframe>
</body>
</html>

View file

@ -0,0 +1 @@
<a id="submit" href="#" onclick="window.top.location = 'issue5237_target.html'; return false;">Continue</a>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Target page for issue 5237</title>
</head>
<body>
<h1>Test passed</h1>
</map>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Link that continues on next line</title>
</head>
<body>
<div style="width:300px">
<div style="float:left;width:200px;background:red">placeholder</div><a id="link" href="submitted_page.html">Link that continues on next line</a>
</div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Target Page 1</title>
</head>
<body>
<div>Target Page 1</div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Target Page 2</title>
</head>
<body>
<div>Target Page 2</div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Target Page 3</title>
</head>
<body>
<div>Target Page 3</div>
</body>
</html>

View file

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>An element that disappears on click</title>
<style>
#under {
position: absolute;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
background-color: white;
}
#partially_under {
position: absolute;
top: 20px;
left: 10px;
width: 100px;
height: 100px;
background-color: blue;
opacity: 0.5;
}
#over {
position: absolute;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
background-color: red;
opacity: 0.5;
}
#log {
position: absolute;
top: 120px;
}
</style>
</head>
<body id="body">
<div id="under"><p id="contents">Hello</p></div>
<div id="partially_under"><p id="other_contents">Hello</p></div>
<div id="over"></div>
<div id="log">
<p>Log:<p>
</div>
<script>
var byId = document.getElementById.bind(document);
var log = byId("log");
function handler(ev) {
log.innerHTML += "<p></p>";
log.lastElementChild.textContent = ev.type + " in " + ev.target.id + " (handled by " + ev.currentTarget.id + ")\n";
}
var under = byId("under");
var over = byId("over");
var body = document.body;
var types = ["click", "mousedown", "mouseup"];
for (var i = 0, type; (type = types[i]); ++i) {
under.addEventListener(type, handler);
over.addEventListener(type, handler);
body.addEventListener(type, handler);
}
</script>
</body>
</html>

View file

@ -0,0 +1,124 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>An element that disappears on click</title>
<style>
#under_under {
position: absolute;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
background-color: white;
}
#under {
position: absolute;
top: 20px;
left: 20px;
width: 100px;
height: 100px;
background-color: blue;
opacity: 0.1;
}
#over1 {
position: absolute;
top: 10px;
left: 10px;
width: 50px;
height: 50px;
background-color: red;
opacity: 0.2;
}
#over2 {
position: absolute;
top: 80px;
left: 10px;
width: 50px;
height: 50px;
background-color: red;
opacity: 0.2;
}
#over3 {
position: absolute;
top: 10px;
left: 80px;
width: 50px;
height: 50px;
background-color: red;
opacity: 0.2;
}
#over4 {
position: absolute;
top: 80px;
left: 80px;
width: 50px;
height: 50px;
background-color: red;
opacity: 0.2;
}
#over5 {
position: absolute;
top: 45px;
left: 45px;
width: 50px;
height: 50px;
background-color: red;
opacity: 0.2;
}
#log {
position: absolute;
top: 120px;
}
</style>
</head>
<body id="body">
<div id="under_under"><p id="contents">Hello</p></div>
<div id="under"><p id="other_contents">Hello</p></div>
<div id="over1"></div>
<div id="over2"></div>
<div id="over3"></div>
<div id="over4"></div>
<div id="over5"></div>
<div id="log">
<p>Log:<p>
</div>
<script>
var byId = document.getElementById.bind(document);
var log = byId("log");
function handler(ev) {
log.innerHTML += "<p></p>";
log.lastElementChild.textContent = ev.type + " in " + ev.target.id + " (handled by " + ev.currentTarget.id + ")\n";
}
var under_under = byId("under_under");
var under = byId("under");
var over1 = byId("over1");
var over2 = byId("over2");
var over3 = byId("over3");
var over4 = byId("over4");
var over5 = byId("over5");
var body = document.body;
var types = ["click", "mousedown", "mouseup"];
for (var i = 0, type; (type = types[i]); ++i) {
under_under.addEventListener(type, handler);
under.addEventListener(type, handler);
over1.addEventListener(type, handler);
over2.addEventListener(type, handler);
over3.addEventListener(type, handler);
over4.addEventListener(type, handler);
over5.addEventListener(type, handler);
body.addEventListener(type, handler);
}
</script>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Link that continues on next line</title>
</head>
<body>
<div style="width:300px">
<div style="float:left;width:200px;background:red">placeholder</div><span id="span" onclick="document.location='submitted_page.html'">Span that continues on next line</span>
</div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Submitted Successfully!</title>
</head>
<body>
<h1>Submitted Successfully!</h1>
</body>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>A wrapped element with overlapped first part</title>
</head>
<body id="body">
<div style="width:300px">
<div style="float:left;width:200px;background:green;">placeholder</div>
<div style="float:left; position:absolute;width:100px;margin-left:200px;background:red;opacity:0.5;">Over</div>
<a id="link" href="submitted_page.html">Link that continues on next line</a>
</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<a id="click" href="clicks.html" target="_parent">
<div style="width: 10001px; height: 10001px; background-color: green;">
&nbsp; &nbsp; &nbsp;
</div>
</a>
</body>
</html>

View file

@ -0,0 +1,11 @@
<html>
<head>
<title>This page has iframes</title>
</head>
<body>
<h1 id="iframe_page_heading">This is the heading</h1>
<iframe src="click_too_big.html" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" allowtransparency="true"
frameborder="0" height="10001" scrolling="no" width="10001" id="iframe1" name="iframe1-name" />
</body>
</html>

View file

@ -0,0 +1,35 @@
<html>
<head>
<title>clicks</title>
</head>
<body>
<h1>Testing Clicks</h1>
<iframe id="source" src="click_source.html">
</iframe>
<iframe id="target" name="target">
</iframe>
<br>
<a href="xhtmlTest.html" id="normal">I'm a normal link</a>
<br/>
<a href="#" id="anchor">I go to an anchor</a>
<br>
<a href="javascript:window.open('xhtmlTest.html', '_blank')" id="new-window">I open a window with javascript</a>
<br/>
<a href="xhtmlTest.html" id="twoClientRects"><span></span><span>Click me</span></a>
<br/>
<a href="xhtmlTest.html" id="link-with-enclosed-image"><img id="enclosed-image" src="./icon.gif"/></a>
<br/>
<a href="xhtmlTest.html" id="link-with-enclosed-span"><span id="enclosed-span" style="color: rgb(0, 255, 0)">I'm a green link</span></a>
<p style="background: none repeat scroll 0% 0% rgb(0, 255, 0); width: 5em;"><a id="overflowLink" href="xhtmlTest.html">looooooooooong short looooooooooong</a>
</p>
<div id="bubblesTo" onclick="window.bubbledClick = true;">
<a id="bubblesFrom">I bubble</a>
</div>
<a href="xhtmlTest.html">333333</a>
<p><a href="xhtmlTest.html" id="embeddedBlock"><span style="display: block;">I have a span</span><div>And a div</div><span>And another span</span></a></p>
</body>
</html>

View file

@ -0,0 +1,8 @@
<html>
<head>
<title>closeable window</title>
</head>
<body>
This window can be closed by clicking on <a id="close" onclick="window.setTimeout(function() { window.close();}, 0);" href="#">this</a>.
</body>
</html>

View file

@ -0,0 +1,156 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
/* default css */
table {
font-size: 1em;
line-height: inherit;
}
div, address, ol, ul, li, option, select {
margin-top: 0px;
margin-bottom: 0px;
}
p {
margin: 0px;
}
body {
margin: 0px;
padding-left: 50px;
padding-right: 50px;
padding-top: 40px;
}
h6 { font-size: 10pt }
h5 { font-size: 11pt }
h4 { font-size: 12pt }
h3 { font-size: 13pt }
h2 { font-size: 14pt }
h1 { font-size: 16pt }
blockquote {padding: 10px; border: 1px #DDD dashed }
a img {border: 0}
div.google_header, div.google_footer {
position: relative;
margin-top: 1em;
margin-bottom: 1em;
}
/* end default css */
/* default print css */
@media print {
body {
padding: 0;
margin: 0;
}
div.google_header, div.google_footer {
display: block;
min-height: 0;
border: none;
}
div.google_header {
flow: static(header);
}
/* used to insert page numbers */
div.google_header::before, div.google_footer::before {
position: absolute;
top: 0;
}
div.google_footer {
flow: static(footer);
}
/* always consider this element at the start of the doc */
div#google_footer {
flow: static(footer, start);
}
span.google_pagenumber {
content: counter(page);
}
span.google_pagecount {
content: counter(pages);
}
}
@page {
@top {
content: flow(header);
}
@bottom {
content: flow(footer);
}
}
/* end default print css */
/* custom css */
/* end custom css */
/* ui edited css */
body {
font-family: Verdana;
font-size: 10.0pt;
line-height: normal;
background-color: #ffffff;
}
/* end ui edited css */
</style>
</head>
<body revision="cczv65wb_54f62cc9f2:3">
<div id="result">
</div>
<h1>展望2008世界大势风起云涌 激荡人心</h1><br>
<br>
8月8日晚北京2008年奥运会倒计时一周年庆祝活动在天安门广场举行。图为庆祝活动中的文艺演出。 新华社记者刘卫兵摄
2008年世界风起云涌,激荡人心。但要作出一个预测,首先要对今天所处的世界有一个基本共识。<br>
<br>
<a href=simpleTest.html id=b7v9 title=中国之声>中国之声</a><br>
<br>
<br>
<form action="simpleTest.html">
<input name="i18n" onchange="document.getElementById('result').innerHTML = '<p>' + this.value + '</p>';" />
</form>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Color Page</title>
</head>
<body>
<div id="namedColor" style="background-color: green;">namedColor</div>
<div id="rgb" style="background-color: rgb(0,128,0);">rgb</div>
<div id="rgbpct" style="background-color: rgb(0%,50%,0%);">rgbpct</div>
<div id="hex" style="background-color: #008000;">hex</div>
<div id="hexShort" style="background-color: #eee;">hex</div>
<div id="hsl" style="background-color: hsl(120,100%,25%);">hsl</div>
<div id="rgba" style="background-color: rgba(0,128,0, 0.5);">rgba</div>
<div id="rgbapct" style="background-color: rgba(0%,50%,0%, 0.5);">rgba</div>
<div id="hsla" style="background-color: hsla(120,100%,25%,0.5);">hsla</div>
</body>
</html>

View file

@ -0,0 +1,30 @@
<html>
<head>
<title>Testing cookies</title>
<script type="text/javascript">
function setCookie(domain, name) {
document.cookie = name + "=ok;path=/;domain=" + domain;
}
function showCookie() {
document.getElementById("result").innerHTML = "<p>" + document.cookie + "</p>";
}
</script>
</head>
<body onload="showCookie();">
<h2>Cookie Mashing</h2>
.com <a href="#" onclick="setCookie('.com', 'the.com_one'); showCookie(); return false;">Click</a></br />
. <a href="#" onclick="setCookie('.', 'the.one'); showCookie(); return false;">Click</a></br />
google.com <a href="#" onclick="setCookie('google.com', 'google'); showCookie(); return false;">Click</a></br />
.google.com <a href="#" onclick="setCookie('.google.com', '.google'); showCookie(); return false;">Click</a></br />
127.0.0.1 <a href="#" onclick="setCookie('127.0.0.1', 'localhost'); showCookie(); return false;">Click</a></br />
localhost:3001 <a href="#" onclick="setCookie('mency.ad.corp.google.com:62210', 'with_port'); showCookie(); return false;">Click</a></br />
.google:3001 <a href="#" onclick="setCookie('.google.com:62210', 'with_domain_and_port'); showCookie(); return false;">Click</a></br />
172.16.12.225 <a href="#" onclick="setCookie('172.16.12.225', 'raw_IP'); showCookie(); return false;">Click</a></br />
172.16.12.225:port <a href="#" onclick="setCookie('172.16.12.225:62210', 'raw_IP_and_port'); showCookie(); return false;">Click</a></br />
<a href="#" onclick="document.cookie = 'foo=bar;path=/common/galaxy';">Set on a different path</a>
<div id="result"></div>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Welcome Page</title>
</head>
<body style="margin: 10px; padding: 0px;">
<iframe name="ifr" src="simple_page.html" width="400" height="300" style="border: 5px solid;"></iframe>
</body>
</html>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Welcome Page</title>
</head>
<body style="margin: 10px; padding: 0px;">
<iframe name="ifr" src="element_in_frame.html" width="500" height="400" style="border: 5px solid;"></iframe>
</body>
</html>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Element Out Of View</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div style="height: 5000px;">Placeholder</div>
<div id="box" style="width: 100px; height: 100px; background-color: red;">Red box</div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Empty Element</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div id="box"></div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Fixed Element</title>
</head>
<body>
<div id="fixed" style="position:fixed; top:0px; left:100px; background-color:red">fixed red box</div>
<div id="placeholder" style="height: 5000px; background-color:green">Placeholder</div>
<div id="bottom">Element at the bottom</div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Hidden Element</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div id="box" style="width: 100px; height: 100px; background-color: red; visibility: hidden;">Hidden box</div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Invisible Element</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div id="box" style="width: 100px; height: 100px; background-color: red; display: none;">Invisible box</div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Page With Transparent Element</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div id="box" style="width: 100px; height: 100px; background-color: red; opacity: 0;">Hidden box</div>
<div>Tex after box</div>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Simple Page</title>
</head>
<body style="margin: 10px; padding: 0px;">
<div id="box" style="width: 100px; height: 100px; background-color: red;">Red box</div>
<div>Tex after box</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,573 @@
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
.ui-widget-content a { color: #333333; }
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #ffffff; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
/* Overlays */
.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
* jQuery UI Resizable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Accordion 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*
* jQuery UI Autocomplete 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.10
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
/*
* jQuery UI Button 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Slider 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI Datepicker 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Progressbar 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<style>
#parentY {
transform: translateY(-10000px);
-webkit-transform: translateY(-10000px);
-o-transform: translateY(-10000px);
-ms-transform: translateY(-10000px);
-moz-transform: translateY(-10000px);
}
#parentX {
transform: translateX(-10000px);
-webkit-transform: translateX(-10000px);
-o-transform: translateX(-10000px);
-ms-transform: translateX(-10000px);
-moz-transform: translateX(-10000px);
}
#transformX {
transform: translateX(-10000px);
-webkit-transform: translateX(-10000px);
-o-transform: translateX(-10000px);
-ms-transform: translateX(-10000px);
-moz-transform: translateX(-10000px);
}
#transformY {
transform: translateY(-10000px);
-webkit-transform: translateY(-10000px);
-o-transform: translateY(-10000px);
-ms-transform: translateY(-10000px);
-moz-transform: translateY(-10000px);
}
#zero-transform {
transform: translateY(0px);
-webkit-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
-moz-transform: translateY(0px);
transform: translateX(0px);
-webkit-transform: translateX(0px);
-o-transform: translateX(0px);
-ms-transform: translateX(0px);
-moz-transform: translateX(0px);
}
</style>
<div id='zero-tranform'>
You shouldn't see anything other than this sentence on the page
</div>
<div id='parentY'>
I have a hidden child
<div id='childY'>
I am a hidden child
</div>
</div>
<div id='parentX'>
I have a hidden child
<div id='childX'>
I am a hidden child
</div>
</div>
<div id='transformX'>I am a hidden element </div>
<div id='transformY'>I am a hidden element </div>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<style>
#negative-percentage-transformY{
transform: translateY(-75px);
-webkit-transform: translateY(-75%);
-o-transform: translateY(-75%);
-ms-transform: translateY(-75%);
-moz-transform: translateY(-75%);
}
.block {
display = block;
}
</style>
<div class='block'>
<br/>
</div>
<br/>
<div class='block'>
</div>
<div id='negative-percentage-transformY'>I am not a hidden element </div>

View file

@ -0,0 +1,13 @@
<html>
<head>
<title>Document Write In Onload</title>
<script>
function init() {
document.writeln('goodbye, world!');
}
</script>
</head>
<body onload="init();">
<p>hello world</p>
</body>
</html>

View file

@ -0,0 +1,67 @@
<html>
<head>
<style>
<!--
.dragme{position:relative;}
-->
</style>
<script language="JavaScript1.2">
<!--
var ie=document.all;
var nn6=document.getElementById&&!document.all;
var isdrag=false;
var x,y;
var dobj;
function movemouse(e)
{
if (isdrag)
{
dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
return false;
}
}
function selectmouse(e)
{
var fobj = nn6 ? e.target : event.srcElement;
var topelement = nn6 ? "HTML" : "BODY";
while (fobj.tagName != topelement && fobj.className != "dragme")
{
fobj = nn6 ? fobj.parentNode : fobj.parentElement;
}
if (fobj.className=="dragme")
{
isdrag = true;
dobj = fobj;
tx = parseInt(dobj.style.left+0);
ty = parseInt(dobj.style.top+0);
x = nn6 ? e.clientX : event.clientX;
y = nn6 ? e.clientY : event.clientY;
document.onmousemove=movemouse;
return false;
}
}
document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");
//-->
</script>
</head>
<body>
<div style="overflow: scroll; margin: 20px; height: 90%; width: 90%">
<div style="height: 4000px; width: 4000px;">
<div id="test1" class="dragme" style="width: 100px; height: 100px;
background-color: black;" />
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,102 @@
<html>
<body>
<style>
<!--
.dragme{position:relative;}
-->
</style>
<script language="JavaScript1.2">
<!--
var ie=document.all;
var nn6=document.getElementById&&!document.all;
var isdrag=false;
var x,y;
var dobj;
function movemouse(e)
{
if (isdrag)
{
if (e && e.clientX)
{
dobj.style.left = tx + e.clientX - x;
dobj.style.top = ty + e.clientY - y
}
else
{
dobj.style.left = tx + event.clientX - x;
dobj.style.top = ty + event.clientY - y;
}
return false;
}
}
function selectmouse(e)
{
var fobj;
var topelement;
if (e && e.target)
{
fobj = e.target;
topelement = "HTML";
}
else
{
fobj = event.srcElement;
topelement = "BODY";
}
while (fobj.tagName != topelement && fobj.className != "dragme")
{
if (fobj.parentNode)
{
fobj = fobj.parentNode;
}
else
{
fobj = fobj.parentElement;
}
}
if (fobj.className=="dragme")
{
isdrag = true;
dobj = fobj;
tx = parseInt(dobj.style.left+0);
ty = parseInt(dobj.style.top+0);
if (e && e.clientX)
{
x = e.clientX;
y = e.clientY;
}
else
{
x = event.clientX;
y = event.clientY;
}
document.onmousemove=movemouse;
return false;
}
}
document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");
//-->
</script>
<img src="icon.gif" class="dragme" id="test1"><br>
<img src="icon.gif" class="dragme" id="test2"><br>
<b>"Hi there</b>
<div style="position: absolute; left: 210px; top: 80px; height: 400px; width: 100px; padding: 10em;">
<img src="icon.gif" class="dragme" id="test3"><br>
<img src="icon.gif" class="dragme" id="test4"><br>
</div>
</body>
</html>

View file

@ -0,0 +1,104 @@
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<style type="text/css">
body {
color: #222;
font-size: 13px;
}
.time-slot {
height: 47px;
vertical-align: top;
border-top: 1px solid #ddd;
padding-right: 2px;
z-index: 2;
}
#time-marker {
border-top: 3px solid #4d90fe;
height: 6px;
position: absolute;
width: 100%;
z-index: 4;
cursor: row-resize;
}
</style>
</head>
<body>
<div style="position: absolute; overflow: hidden; width: 250px; height: 470px;">
<div style="position: relative;">
<div style="overflow: auto; position: relative; height: 85%; border: 1px solid #ebebeb">
<div id="time-marker" style="top: 432;"></div>
<div class="time-slot">12am</div>
<div class="time-slot">1am</div>
<div class="time-slot">2am</div>
<div class="time-slot">3am</div>
<div class="time-slot">4am</div>
<div class="time-slot">5am</div>
<div class="time-slot">6am</div>
<div class="time-slot">7am</div>
<div class="time-slot">8am</div>
<div class="time-slot">9am</div>
<div class="time-slot">10am</div>
<div id="11am" class="time-slot">11am</div>
<div class="time-slot">12pm</div>
<div class="time-slot">1pm</div>
<div class="time-slot">2pm</div>
<div class="time-slot">3pm</div>
<div class="time-slot">4pm</div>
<div class="time-slot">5pm</div>
<div class="time-slot">6pm</div>
<div class="time-slot">7pm</div>
<div class="time-slot">8pm</div>
<div class="time-slot">9pm</div>
<div class="time-slot">10pm</div>
<div class="time-slot">11pm</div>
</div>
</div>
</div>
<script type="text/javascript">
var startTime = document.getElementById('time-marker');
var ie = document.all;
var nn6 = document.getElementById && !document.all;
var isDrag = false;
var x, y, tx, ty;
var dragEl;
function movemouse(e) {
if (isDrag) {
var dy = (nn6 ? e.clientY - y : event.clientY - y);
if (dy % 12 == 0) {
dragEl.style.top = ty + dy;
}
return false;
}
}
function selectmouse(e) {
var srcEl = nn6 ? e.target : event.srcElement;
var topElement = nn6 ? "HTML" : "BODY";
while (srcEl.tagName != topElement && srcEl != startTime) {
srcEl = nn6 ? srcEl.parentNode : srcEl.parentElement;
}
if (srcEl === startTime) {
isDrag = true;
dragEl = srcEl;
tx = parseInt(dragEl.style.left + 0);
ty = parseInt(dragEl.style.top + 0);
x = nn6 ? e.clientX : event.clientX;
y = nn6 ? e.clientY : event.clientY;
document.onmousemove = movemouse;
return false;
}
}
document.onmousedown = selectmouse;
document.onmouseup = function() { isDrag = false; };
</script>
</body>
</html>

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Sortable - Connect lists</title>
<!--link type="text/css" href="development-bundle/themes/base/jquery.ui.all.css" rel="stylesheet" /-->
<!--link type="text/css" href="development-bundle/demos/demos.css" rel="stylesheet" /-->
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script>
<style type="text/css">
#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
#sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
</style>
<script type="text/javascript">
$(function() {
$("#sortable1, #sortable2").sortable({
connectWith: '.connectedSortable'
}).disableSelection();
var report_event = function(report_text) {
var reportElement = $("#dragging_reports");
var origText = reportElement.text();
reportElement.text(origText + " " + report_text);
}
$("#sortable2").droppable({
out: function(event, ui) {
report_event("DragOut");
}
});
$("#sortable1").droppable({
drop: function(event, ui) {
report_event("DropIn " + ui.draggable.text());
}
});
});
</script>
</head>
<body>
<div class="demo">
<ul id="sortable1" class="connectedSortable">
<li id="leftitem-1" class="ui-state-default">LeftItem 1</li>
<li id="leftitem-2" class="ui-state-default">LeftItem 2</li>
<li id="leftitem-3" class="ui-state-default">LeftItem 3</li>
<li id="leftitem-4" class="ui-state-default">LeftItem 4</li>
<li id="leftitem-5" class="ui-state-default">LeftItem 5</li>
</ul>
<ul id="sortable2" class="connectedSortable">
<li id="rightitem-1" class="ui-state-highlight">RightItem 1</li>
<li id="rightitem-2" class="ui-state-highlight">RightItem 2</li>
<li id="rightitem-3" class="ui-state-highlight">RightItem 3</li>
<li id="rightitem-4" class="ui-state-highlight">RightItem 4</li>
<li id="rightitem-5" class="ui-state-highlight">RightItem 5</li>
</ul>
</div>
<br/>
<div class="test-data">
<p id="dragging_reports">Nothing happened.</p>
</div>
</body>
</html>

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>jQuery UI Droppable - Default Demo</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script>
<style type="text/css">
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
</style>
<script type="text/javascript">
$(function() {
$("#draggable").draggable();
$("#droppable").droppable({
drop: function(event, ui) {
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
}
});
var report_event = function(report_text) {
var reportElement = $("#drop_reports");
var origText = reportElement.text();
reportElement.text(origText + " " + report_text);
}
$('body').mousedown(function() {
report_event('down');
});
$('body').mousemove(function() {
report_event('move');
});
$('body').mouseup(function() {
report_event('up');
});
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Drag me to my target</p>
</div>
<div id="droppable" class="ui-widget-header">
<p>Drop here</p>
</div>
<div class="test-data">
<p id="drop_reports">start</p>
</div>
</div><!-- End demo -->
<div class="demo-description">
<p>Taken from the JQuery demo.</p>
</div><!-- End demo-description -->
</body>
</html>

View file

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script type="text/javascript">
var next = 0;
function addMore() {
var box = document.createElement('DIV');
box.id = 'box' + next++;
box.className = 'redbox';
box.style.width = '150px';
box.style.height = '150px';
box.style.backgroundColor = 'red';
box.style.border = '1px solid black';
box.style.margin = '5px';
window.setTimeout(function() {
document.body.appendChild(box);
}, 1000);
}
function reveal() {
var elem = document.getElementById('revealed');
window.setTimeout(function() {
elem.style.display = '';
}, 1000);
}
</script>
</head>
<body>
<input id="adder" type="button" value="Add a box!" onclick="addMore()"/>
<input id="reveal" type="button" value="Reveal a new input" onclick="reveal();" />
<input id="revealed" style="display:none;" />
</body>
</html>

View file

@ -0,0 +1,42 @@
<?xml version="1.0">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Delayed remove of an element</title>
<script type="text/javascript">
var parentNode;
var elementId;
function timedRemove()
{
var t = setTimeout('removeElement()', 500);
t = setTimeout('insertElement()', 2000);
}
function removeElement()
{
var element = document.getElementById('element-to-remove');
elementId = element.id;
parentNode = element.parentNode;
parentNode.removeChild(element);
}
function insertElement()
{
var newElement = document.createElement('p');
newElement.setAttribute('id', elementId);
newElement.innerHTML = 'new element';
parentNode.appendChild(newElement);
}
</script>
</head>
<body>
<form>
<input id="buttonDelete" type="button" value="element will be removed in half a second"
onclick="timedRemove()"/>
</form>
<p id="element-to-remove">element</p>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
window.ERRORS = [];
window.onerror = function(e) {
window.ERRORS.push(e);
};
</script>
</head>
<body>
<input type="button" value="Throw!" onclick="throw Error('boom!');"/>
</body>
</html>

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>Fixed footer with no scrollbar</title>
</head>
<body>
<div style="width: 100%; min-height: 100%;">
<div style="position: absolute; bottom: 0px;">
<a id="link" href="xhtmlTest.html">Click me</a>
</div>
</div>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show more