Reorganized unit tests to match the file structure of the source.
This commit is contained in:
parent
be44ca0089
commit
0cc28be265
130
test/unit/class_test.js
Normal file
130
test/unit/class_test.js
Normal file
@ -0,0 +1,130 @@
|
||||
new Test.Unit.Runner({
|
||||
testClassCreate: function() {
|
||||
this.assert(Object.isFunction(Animal), 'Animal is not a constructor');
|
||||
this.assertEnumEqual([Cat, Mouse, Dog, Ox], Animal.subclasses);
|
||||
Animal.subclasses.each(function(subclass) {
|
||||
this.assertEqual(Animal, subclass.superclass);
|
||||
}, this);
|
||||
|
||||
var Bird = Class.create(Animal);
|
||||
this.assertEqual(Bird, Animal.subclasses.last());
|
||||
// for..in loop (for some reason) doesn't iterate over the constructor property in top-level classes
|
||||
this.assertEnumEqual(Object.keys(new Animal).sort(), Object.keys(new Bird).without('constructor').sort());
|
||||
},
|
||||
|
||||
testClassInstantiation: function() {
|
||||
var pet = new Animal("Nibbles");
|
||||
this.assertEqual("Nibbles", pet.name, "property not initialized");
|
||||
this.assertEqual('Nibbles: Hi!', pet.say('Hi!'));
|
||||
this.assertEqual(Animal, pet.constructor, "bad constructor reference");
|
||||
this.assertUndefined(pet.superclass);
|
||||
|
||||
var Empty = Class.create();
|
||||
this.assert('object', typeof new Empty);
|
||||
},
|
||||
|
||||
testInheritance: function() {
|
||||
var tom = new Cat('Tom');
|
||||
this.assertEqual(Cat, tom.constructor, "bad constructor reference");
|
||||
this.assertEqual(Animal, tom.constructor.superclass, 'bad superclass reference');
|
||||
this.assertEqual('Tom', tom.name);
|
||||
this.assertEqual('Tom: meow', tom.say('meow'));
|
||||
this.assertEqual('Tom: Yuk! I only eat mice.', tom.eat(new Animal));
|
||||
},
|
||||
|
||||
testSuperclassMethodCall: function() {
|
||||
var tom = new Cat('Tom');
|
||||
this.assertEqual('Tom: Yum!', tom.eat(new Mouse));
|
||||
|
||||
// augment the constructor and test
|
||||
var Dodo = Class.create(Animal, {
|
||||
initialize: function($super, name) {
|
||||
$super(name);
|
||||
this.extinct = true;
|
||||
},
|
||||
|
||||
say: function($super, message) {
|
||||
return $super(message) + " honk honk";
|
||||
}
|
||||
});
|
||||
|
||||
var gonzo = new Dodo('Gonzo');
|
||||
this.assertEqual('Gonzo', gonzo.name);
|
||||
this.assert(gonzo.extinct, 'Dodo birds should be extinct');
|
||||
this.assertEqual("Gonzo: hello honk honk", gonzo.say("hello"));
|
||||
},
|
||||
|
||||
testClassAddMethods: function() {
|
||||
var tom = new Cat('Tom');
|
||||
var jerry = new Mouse('Jerry');
|
||||
|
||||
Animal.addMethods({
|
||||
sleep: function() {
|
||||
return this.say('ZZZ');
|
||||
}
|
||||
});
|
||||
|
||||
Mouse.addMethods({
|
||||
sleep: function($super) {
|
||||
return $super() + " ... no, can't sleep! Gotta steal cheese!";
|
||||
},
|
||||
escape: function(cat) {
|
||||
return this.say('(from a mousehole) Take that, ' + cat.name + '!');
|
||||
}
|
||||
});
|
||||
|
||||
this.assertEqual('Tom: ZZZ', tom.sleep(), "added instance method not available to subclass");
|
||||
this.assertEqual("Jerry: ZZZ ... no, can't sleep! Gotta steal cheese!", jerry.sleep());
|
||||
this.assertEqual("Jerry: (from a mousehole) Take that, Tom!", jerry.escape(tom));
|
||||
// insure that a method has not propagated *up* the prototype chain:
|
||||
this.assertUndefined(tom.escape);
|
||||
this.assertUndefined(new Animal().escape);
|
||||
|
||||
Animal.addMethods({
|
||||
sleep: function() {
|
||||
return this.say('zZzZ');
|
||||
}
|
||||
});
|
||||
|
||||
this.assertEqual("Jerry: zZzZ ... no, can't sleep! Gotta steal cheese!", jerry.sleep());
|
||||
},
|
||||
|
||||
testBaseClassWithMixin: function() {
|
||||
var grass = new Plant('grass', 3);
|
||||
this.assertRespondsTo('getValue', grass);
|
||||
this.assertEqual('#<Plant: grass>', grass.inspect());
|
||||
},
|
||||
|
||||
testSubclassWithMixin: function() {
|
||||
var snoopy = new Dog('Snoopy', 12, 'male');
|
||||
this.assertRespondsTo('reproduce', snoopy);
|
||||
},
|
||||
|
||||
testSubclassWithMixins: function() {
|
||||
var cow = new Ox('cow', 400, 'female');
|
||||
this.assertEqual('#<Ox: cow>', cow.inspect());
|
||||
this.assertRespondsTo('reproduce', cow);
|
||||
this.assertRespondsTo('getValue', cow);
|
||||
},
|
||||
|
||||
testClassWithToStringAndValueOfMethods: function() {
|
||||
var Foo = Class.create({
|
||||
toString: function() { return "toString" },
|
||||
valueOf: function() { return "valueOf" }
|
||||
});
|
||||
|
||||
var Parent = Class.create({
|
||||
m1: function(){ return 'm1' },
|
||||
m2: function(){ return 'm2' }
|
||||
});
|
||||
var Child = Class.create(Parent, {
|
||||
m1: function($super) { return 'm1 child' },
|
||||
m2: function($super) { return 'm2 child' }
|
||||
});
|
||||
|
||||
this.assert(new Child().m1.toString().indexOf('m1 child') > -1);
|
||||
|
||||
this.assertEqual("toString", new Foo().toString());
|
||||
this.assertEqual("valueOf", new Foo().valueOf());
|
||||
}
|
||||
});
|
5
test/unit/date_test.js
Normal file
5
test/unit/date_test.js
Normal file
@ -0,0 +1,5 @@
|
||||
new Test.Unit.Runner({
|
||||
testDateToJSON: function() {
|
||||
this.assertEqual('\"1970-01-01T00:00:00Z\"', new Date(Date.UTC(1970, 0, 1)).toJSON());
|
||||
}
|
||||
});
|
83
test/unit/fixtures/class.js
Normal file
83
test/unit/fixtures/class.js
Normal file
@ -0,0 +1,83 @@
|
||||
// base class
|
||||
var Animal = Class.create({
|
||||
initialize: function(name) {
|
||||
this.name = name;
|
||||
},
|
||||
name: "",
|
||||
eat: function() {
|
||||
return this.say("Yum!");
|
||||
},
|
||||
say: function(message) {
|
||||
return this.name + ": " + message;
|
||||
}
|
||||
});
|
||||
|
||||
// subclass that augments a method
|
||||
var Cat = Class.create(Animal, {
|
||||
eat: function($super, food) {
|
||||
if (food instanceof Mouse) return $super();
|
||||
else return this.say("Yuk! I only eat mice.");
|
||||
}
|
||||
});
|
||||
|
||||
// empty subclass
|
||||
var Mouse = Class.create(Animal, {});
|
||||
|
||||
//mixins
|
||||
var Sellable = {
|
||||
getValue: function(pricePerKilo) {
|
||||
return this.weight * pricePerKilo;
|
||||
},
|
||||
|
||||
inspect: function() {
|
||||
return '#<Sellable: #{weight}kg>'.interpolate(this);
|
||||
}
|
||||
};
|
||||
|
||||
var Reproduceable = {
|
||||
reproduce: function(partner) {
|
||||
if (partner.constructor != this.constructor || partner.sex == this.sex)
|
||||
return null;
|
||||
var weight = this.weight / 10, sex = Math.random(1).round() ? 'male' : 'female';
|
||||
return new this.constructor('baby', weight, sex);
|
||||
}
|
||||
};
|
||||
|
||||
// base class with mixin
|
||||
var Plant = Class.create(Sellable, {
|
||||
initialize: function(name, weight) {
|
||||
this.name = name;
|
||||
this.weight = weight;
|
||||
},
|
||||
|
||||
inspect: function() {
|
||||
return '#<Plant: #{name}>'.interpolate(this);
|
||||
}
|
||||
});
|
||||
|
||||
// subclass with mixin
|
||||
var Dog = Class.create(Animal, Reproduceable, {
|
||||
initialize: function($super, name, weight, sex) {
|
||||
this.weight = weight;
|
||||
this.sex = sex;
|
||||
$super(name);
|
||||
}
|
||||
});
|
||||
|
||||
// subclass with mixins
|
||||
var Ox = Class.create(Animal, Sellable, Reproduceable, {
|
||||
initialize: function($super, name, weight, sex) {
|
||||
this.weight = weight;
|
||||
this.sex = sex;
|
||||
$super(name);
|
||||
},
|
||||
|
||||
eat: function(food) {
|
||||
if (food instanceof Plant)
|
||||
this.weight += food.weight;
|
||||
},
|
||||
|
||||
inspect: function() {
|
||||
return '#<Ox: #{name}>'.interpolate(this);
|
||||
}
|
||||
});
|
13
test/unit/fixtures/function.js
Normal file
13
test/unit/fixtures/function.js
Normal file
@ -0,0 +1,13 @@
|
||||
var arg1 = 1;
|
||||
var arg2 = 2;
|
||||
var arg3 = 3;
|
||||
function TestObj() { };
|
||||
TestObj.prototype.assertingEventHandler =
|
||||
function(event, assertEvent, assert1, assert2, assert3, a1, a2, a3) {
|
||||
assertEvent(event);
|
||||
assert1(a1);
|
||||
assert2(a2);
|
||||
assert3(a3);
|
||||
};
|
||||
|
||||
var globalBindTest = null;
|
6
test/unit/fixtures/object.html
Normal file
6
test/unit/fixtures/object.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div id="test"></div>
|
||||
<ul id="list">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
7
test/unit/fixtures/object.js
Normal file
7
test/unit/fixtures/object.js
Normal file
@ -0,0 +1,7 @@
|
||||
var Person = function(name){
|
||||
this.name = name;
|
||||
};
|
||||
|
||||
Person.prototype.toJSON = function() {
|
||||
return '-' + this.name;
|
||||
};
|
133
test/unit/function_test.js
Normal file
133
test/unit/function_test.js
Normal file
@ -0,0 +1,133 @@
|
||||
new Test.Unit.Runner({
|
||||
testFunctionArgumentNames: function() {
|
||||
this.assertEnumEqual([], (function() {}).argumentNames());
|
||||
this.assertEnumEqual(["one"], (function(one) {}).argumentNames());
|
||||
this.assertEnumEqual(["one", "two", "three"], (function(one, two, three) {}).argumentNames());
|
||||
this.assertEnumEqual(["one", "two", "three"], (function( one , two
|
||||
, three ) {}).argumentNames());
|
||||
this.assertEqual("$super", (function($super) {}).argumentNames().first());
|
||||
|
||||
function named1() {};
|
||||
this.assertEnumEqual([], named1.argumentNames());
|
||||
function named2(one) {};
|
||||
this.assertEnumEqual(["one"], named2.argumentNames());
|
||||
function named3(one, two, three) {};
|
||||
this.assertEnumEqual(["one", "two", "three"], named3.argumentNames());
|
||||
function named4(one,
|
||||
two,
|
||||
|
||||
three) {}
|
||||
this.assertEnumEqual($w('one two three'), named4.argumentNames());
|
||||
function named5(/*foo*/ foo, /* bar */ bar, /*****/ baz) {}
|
||||
this.assertEnumEqual($w("foo bar baz"), named5.argumentNames());
|
||||
function named6(
|
||||
/*foo*/ foo,
|
||||
/**/bar,
|
||||
/* baz */ /* baz */ baz,
|
||||
// Skip a line just to screw with the regex...
|
||||
/* thud */ thud) {}
|
||||
this.assertEnumEqual($w("foo bar baz thud"), named6.argumentNames());
|
||||
},
|
||||
|
||||
testFunctionBind: function() {
|
||||
function methodWithoutArguments() { return this.hi };
|
||||
function methodWithArguments() { return this.hi + ',' + $A(arguments).join(',') };
|
||||
var func = Prototype.emptyFunction;
|
||||
|
||||
this.assertIdentical(func, func.bind());
|
||||
this.assertIdentical(func, func.bind(undefined));
|
||||
this.assertNotIdentical(func, func.bind(null));
|
||||
|
||||
this.assertEqual('without', methodWithoutArguments.bind({ hi: 'without' })());
|
||||
this.assertEqual('with,arg1,arg2', methodWithArguments.bind({ hi: 'with' })('arg1','arg2'));
|
||||
this.assertEqual('withBindArgs,arg1,arg2',
|
||||
methodWithArguments.bind({ hi: 'withBindArgs' }, 'arg1', 'arg2')());
|
||||
this.assertEqual('withBindArgsAndArgs,arg1,arg2,arg3,arg4',
|
||||
methodWithArguments.bind({ hi: 'withBindArgsAndArgs' }, 'arg1', 'arg2')('arg3', 'arg4'));
|
||||
},
|
||||
|
||||
testFunctionCurry: function() {
|
||||
var split = function(delimiter, string) { return string.split(delimiter); };
|
||||
var splitOnColons = split.curry(":");
|
||||
this.assertNotIdentical(split, splitOnColons);
|
||||
this.assertEnumEqual(split(":", "0:1:2:3:4:5"), splitOnColons("0:1:2:3:4:5"));
|
||||
this.assertIdentical(split, split.curry());
|
||||
},
|
||||
|
||||
testFunctionDelay: function() {
|
||||
window.delayed = undefined;
|
||||
var delayedFunction = function() { window.delayed = true; };
|
||||
var delayedFunctionWithArgs = function() { window.delayedWithArgs = $A(arguments).join(' '); };
|
||||
delayedFunction.delay(0.8);
|
||||
delayedFunctionWithArgs.delay(0.8, 'hello', 'world');
|
||||
this.assertUndefined(window.delayed);
|
||||
this.wait(1000, function() {
|
||||
this.assert(window.delayed);
|
||||
this.assertEqual('hello world', window.delayedWithArgs);
|
||||
});
|
||||
},
|
||||
|
||||
testFunctionWrap: function() {
|
||||
function sayHello(){
|
||||
return 'hello world';
|
||||
};
|
||||
|
||||
this.assertEqual('HELLO WORLD', sayHello.wrap(function(proceed) {
|
||||
return proceed().toUpperCase();
|
||||
})());
|
||||
|
||||
var temp = String.prototype.capitalize;
|
||||
String.prototype.capitalize = String.prototype.capitalize.wrap(function(proceed, eachWord) {
|
||||
if(eachWord && this.include(' ')) return this.split(' ').map(function(str){
|
||||
return str.capitalize();
|
||||
}).join(' ');
|
||||
return proceed();
|
||||
});
|
||||
this.assertEqual('Hello world', 'hello world'.capitalize());
|
||||
this.assertEqual('Hello World', 'hello world'.capitalize(true));
|
||||
this.assertEqual('Hello', 'hello'.capitalize());
|
||||
String.prototype.capitalize = temp;
|
||||
},
|
||||
|
||||
testFunctionDefer: function() {
|
||||
window.deferred = undefined;
|
||||
var deferredFunction = function() { window.deferred = true; };
|
||||
deferredFunction.defer();
|
||||
this.assertUndefined(window.deferred);
|
||||
this.wait(50, function() {
|
||||
this.assert(window.deferred);
|
||||
|
||||
window.deferredValue = 0;
|
||||
var deferredFunction2 = function(arg) { window.deferredValue = arg; };
|
||||
deferredFunction2.defer('test');
|
||||
this.wait(50, function() {
|
||||
this.assertEqual('test', window.deferredValue);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
testFunctionMethodize: function() {
|
||||
var Foo = { bar: function(baz) { return baz } };
|
||||
var baz = { quux: Foo.bar.methodize() };
|
||||
|
||||
this.assertEqual(Foo.bar.methodize(), baz.quux);
|
||||
this.assertEqual(baz, Foo.bar(baz));
|
||||
this.assertEqual(baz, baz.quux());
|
||||
},
|
||||
|
||||
testBindAsEventListener: function() {
|
||||
for( var i = 0; i < 10; ++i ){
|
||||
var div = document.createElement('div');
|
||||
div.setAttribute('id','test-'+i);
|
||||
document.body.appendChild(div);
|
||||
var tobj = new TestObj();
|
||||
var eventTest = { test: true };
|
||||
var call = tobj.assertingEventHandler.bindAsEventListener(tobj,
|
||||
this.assertEqual.bind(this, eventTest),
|
||||
this.assertEqual.bind(this, arg1),
|
||||
this.assertEqual.bind(this, arg2),
|
||||
this.assertEqual.bind(this, arg3), arg1, arg2, arg3 );
|
||||
call(eventTest);
|
||||
}
|
||||
}
|
||||
});
|
174
test/unit/object_test.js
Normal file
174
test/unit/object_test.js
Normal file
@ -0,0 +1,174 @@
|
||||
new Test.Unit.Runner({
|
||||
testObjectExtend: function() {
|
||||
var object = {foo: 'foo', bar: [1, 2, 3]};
|
||||
this.assertIdentical(object, Object.extend(object));
|
||||
this.assertHashEqual({foo: 'foo', bar: [1, 2, 3]}, object);
|
||||
this.assertIdentical(object, Object.extend(object, {bla: 123}));
|
||||
this.assertHashEqual({foo: 'foo', bar: [1, 2, 3], bla: 123}, object);
|
||||
this.assertHashEqual({foo: 'foo', bar: [1, 2, 3], bla: null},
|
||||
Object.extend(object, {bla: null}));
|
||||
},
|
||||
|
||||
testObjectToQueryString: function() {
|
||||
this.assertEqual('a=A&b=B&c=C&d=D%23', Object.toQueryString({a: 'A', b: 'B', c: 'C', d: 'D#'}));
|
||||
},
|
||||
|
||||
testObjectClone: function() {
|
||||
var object = {foo: 'foo', bar: [1, 2, 3]};
|
||||
this.assertNotIdentical(object, Object.clone(object));
|
||||
this.assertHashEqual(object, Object.clone(object));
|
||||
this.assertHashEqual({}, Object.clone());
|
||||
var clone = Object.clone(object);
|
||||
delete clone.bar;
|
||||
this.assertHashEqual({foo: 'foo'}, clone,
|
||||
"Optimizing Object.clone perf using prototyping doesn't allow properties to be deleted.");
|
||||
},
|
||||
|
||||
testObjectInspect: function() {
|
||||
this.assertEqual('undefined', Object.inspect());
|
||||
this.assertEqual('undefined', Object.inspect(undefined));
|
||||
this.assertEqual('null', Object.inspect(null));
|
||||
this.assertEqual("'foo\\\\b\\\'ar'", Object.inspect('foo\\b\'ar'));
|
||||
this.assertEqual('[]', Object.inspect([]));
|
||||
this.assertNothingRaised(function() { Object.inspect(window.Node) });
|
||||
},
|
||||
|
||||
testObjectToJSON: function() {
|
||||
this.assertUndefined(Object.toJSON(undefined));
|
||||
this.assertUndefined(Object.toJSON(Prototype.K));
|
||||
this.assertEqual('\"\"', Object.toJSON(''));
|
||||
this.assertEqual('[]', Object.toJSON([]));
|
||||
this.assertEqual('[\"a\"]', Object.toJSON(['a']));
|
||||
this.assertEqual('[\"a\", 1]', Object.toJSON(['a', 1]));
|
||||
this.assertEqual('[\"a\", {\"b\": null}]', Object.toJSON(['a', {'b': null}]));
|
||||
this.assertEqual('{\"a\": \"hello!\"}', Object.toJSON({a: 'hello!'}));
|
||||
this.assertEqual('{}', Object.toJSON({}));
|
||||
this.assertEqual('{}', Object.toJSON({a: undefined, b: undefined, c: Prototype.K}));
|
||||
this.assertEqual('{\"b\": [false, true], \"c\": {\"a\": \"hello!\"}}',
|
||||
Object.toJSON({'b': [undefined, false, true, undefined], c: {a: 'hello!'}}));
|
||||
this.assertEqual('{\"b\": [false, true], \"c\": {\"a\": \"hello!\"}}',
|
||||
Object.toJSON($H({'b': [undefined, false, true, undefined], c: {a: 'hello!'}})));
|
||||
this.assertEqual('true', Object.toJSON(true));
|
||||
this.assertEqual('false', Object.toJSON(false));
|
||||
this.assertEqual('null', Object.toJSON(null));
|
||||
var sam = new Person('sam');
|
||||
this.assertEqual('-sam', Object.toJSON(sam));
|
||||
this.assertEqual('-sam', sam.toJSON());
|
||||
var element = $('test');
|
||||
this.assertUndefined(Object.toJSON(element));
|
||||
element.toJSON = function(){return 'I\'m a div with id test'};
|
||||
this.assertEqual('I\'m a div with id test', Object.toJSON(element));
|
||||
},
|
||||
|
||||
testObjectToHTML: function() {
|
||||
this.assertIdentical('', Object.toHTML());
|
||||
this.assertIdentical('', Object.toHTML(''));
|
||||
this.assertIdentical('', Object.toHTML(null));
|
||||
this.assertIdentical('0', Object.toHTML(0));
|
||||
this.assertIdentical('123', Object.toHTML(123));
|
||||
this.assertEqual('hello world', Object.toHTML('hello world'));
|
||||
this.assertEqual('hello world', Object.toHTML({toHTML: function() { return 'hello world' }}));
|
||||
},
|
||||
|
||||
testObjectIsArray: function() {
|
||||
this.assert(Object.isArray([]));
|
||||
this.assert(Object.isArray([0]));
|
||||
this.assert(Object.isArray([0, 1]));
|
||||
this.assert(!Object.isArray({}));
|
||||
this.assert(!Object.isArray($('list').childNodes));
|
||||
this.assert(!Object.isArray());
|
||||
this.assert(!Object.isArray(''));
|
||||
this.assert(!Object.isArray('foo'));
|
||||
this.assert(!Object.isArray(0));
|
||||
this.assert(!Object.isArray(1));
|
||||
this.assert(!Object.isArray(null));
|
||||
this.assert(!Object.isArray(true));
|
||||
this.assert(!Object.isArray(false));
|
||||
this.assert(!Object.isArray(undefined));
|
||||
},
|
||||
|
||||
testObjectIsHash: function() {
|
||||
this.assert(Object.isHash($H()));
|
||||
this.assert(Object.isHash(new Hash()));
|
||||
this.assert(!Object.isHash({}));
|
||||
this.assert(!Object.isHash(null));
|
||||
this.assert(!Object.isHash());
|
||||
this.assert(!Object.isHash(''));
|
||||
this.assert(!Object.isHash(2));
|
||||
this.assert(!Object.isHash(false));
|
||||
this.assert(!Object.isHash(true));
|
||||
this.assert(!Object.isHash([]));
|
||||
},
|
||||
|
||||
testObjectIsElement: function() {
|
||||
this.assert(Object.isElement(document.createElement('div')));
|
||||
this.assert(Object.isElement(new Element('div')));
|
||||
this.assert(Object.isElement($('testlog')));
|
||||
this.assert(!Object.isElement(document.createTextNode('bla')));
|
||||
|
||||
// falsy variables should not mess up return value type
|
||||
this.assertIdentical(false, Object.isElement(0));
|
||||
this.assertIdentical(false, Object.isElement(''));
|
||||
this.assertIdentical(false, Object.isElement(NaN));
|
||||
this.assertIdentical(false, Object.isElement(null));
|
||||
this.assertIdentical(false, Object.isElement(undefined));
|
||||
},
|
||||
|
||||
testObjectIsFunction: function() {
|
||||
this.assert(Object.isFunction(function() { }));
|
||||
this.assert(Object.isFunction(Class.create()));
|
||||
this.assert(!Object.isFunction("a string"));
|
||||
this.assert(!Object.isFunction($("testlog")));
|
||||
this.assert(!Object.isFunction([]));
|
||||
this.assert(!Object.isFunction({}));
|
||||
this.assert(!Object.isFunction(0));
|
||||
this.assert(!Object.isFunction(false));
|
||||
this.assert(!Object.isFunction(undefined));
|
||||
},
|
||||
|
||||
testObjectIsString: function() {
|
||||
this.assert(!Object.isString(function() { }));
|
||||
this.assert(Object.isString("a string"));
|
||||
this.assert(!Object.isString(0));
|
||||
this.assert(!Object.isString([]));
|
||||
this.assert(!Object.isString({}));
|
||||
this.assert(!Object.isString(false));
|
||||
this.assert(!Object.isString(undefined));
|
||||
},
|
||||
|
||||
testObjectIsNumber: function() {
|
||||
this.assert(Object.isNumber(0));
|
||||
this.assert(Object.isNumber(1.0));
|
||||
this.assert(!Object.isNumber(function() { }));
|
||||
this.assert(!Object.isNumber("a string"));
|
||||
this.assert(!Object.isNumber([]));
|
||||
this.assert(!Object.isNumber({}));
|
||||
this.assert(!Object.isNumber(false));
|
||||
this.assert(!Object.isNumber(undefined));
|
||||
},
|
||||
|
||||
testObjectIsUndefined: function() {
|
||||
this.assert(Object.isUndefined(undefined));
|
||||
this.assert(!Object.isUndefined(null));
|
||||
this.assert(!Object.isUndefined(false));
|
||||
this.assert(!Object.isUndefined(0));
|
||||
this.assert(!Object.isUndefined(""));
|
||||
this.assert(!Object.isUndefined(function() { }));
|
||||
this.assert(!Object.isUndefined([]));
|
||||
this.assert(!Object.isUndefined({}));
|
||||
},
|
||||
|
||||
// sanity check
|
||||
testDoesntExtendObjectPrototype: function() {
|
||||
// for-in is supported with objects
|
||||
var iterations = 0, obj = { a: 1, b: 2, c: 3 };
|
||||
for(property in obj) iterations++;
|
||||
this.assertEqual(3, iterations);
|
||||
|
||||
// for-in is not supported with arrays
|
||||
iterations = 0;
|
||||
var arr = [1,2,3];
|
||||
for(property in arr) iterations++;
|
||||
this.assert(iterations > 3);
|
||||
}
|
||||
});
|
15
test/unit/periodical_executer_test.js
Normal file
15
test/unit/periodical_executer_test.js
Normal file
@ -0,0 +1,15 @@
|
||||
new Test.Unit.Runner({
|
||||
testPeriodicalExecuterStop: function() {
|
||||
var peEventCount = 0;
|
||||
function peEventFired(pe) {
|
||||
if (++peEventCount > 2) pe.stop();
|
||||
}
|
||||
|
||||
// peEventFired will stop the PeriodicalExecuter after 3 callbacks
|
||||
new PeriodicalExecuter(peEventFired, 0.05);
|
||||
|
||||
this.wait(600, function() {
|
||||
this.assertEqual(3, peEventCount);
|
||||
});
|
||||
}
|
||||
});
|
43
test/unit/prototype_test.js
vendored
Normal file
43
test/unit/prototype_test.js
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
new Test.Unit.Runner({
|
||||
testBrowserDetection: function() {
|
||||
var results = $H(Prototype.Browser).map(function(engine){
|
||||
return engine;
|
||||
}).partition(function(engine){
|
||||
return engine[1] === true
|
||||
});
|
||||
var trues = results[0], falses = results[1];
|
||||
|
||||
this.info('User agent string is: ' + navigator.userAgent);
|
||||
|
||||
this.assert(trues.size() == 0 || trues.size() == 1,
|
||||
'There should be only one or no browser detected.');
|
||||
|
||||
// we should have definite trues or falses here
|
||||
trues.each(function(result) {
|
||||
this.assert(result[1] === true);
|
||||
}, this);
|
||||
falses.each(function(result) {
|
||||
this.assert(result[1] === false);
|
||||
}, this);
|
||||
|
||||
if(navigator.userAgent.indexOf('AppleWebKit/') > -1) {
|
||||
this.info('Running on WebKit');
|
||||
this.assert(Prototype.Browser.WebKit);
|
||||
}
|
||||
|
||||
if(!!window.opera) {
|
||||
this.info('Running on Opera');
|
||||
this.assert(Prototype.Browser.Opera);
|
||||
}
|
||||
|
||||
if(!!(window.attachEvent && !window.opera)) {
|
||||
this.info('Running on IE');
|
||||
this.assert(Prototype.Browser.IE);
|
||||
}
|
||||
|
||||
if(navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1) {
|
||||
this.info('Running on Gecko');
|
||||
this.assert(Prototype.Browser.Gecko);
|
||||
}
|
||||
}
|
||||
});
|
42
test/unit/regexp_test.js
Normal file
42
test/unit/regexp_test.js
Normal file
@ -0,0 +1,42 @@
|
||||
new Test.Unit.Runner({
|
||||
testRegExpEscape: function() {
|
||||
this.assertEqual('word', RegExp.escape('word'));
|
||||
this.assertEqual('\\/slashes\\/', RegExp.escape('/slashes/'));
|
||||
this.assertEqual('\\\\backslashes\\\\', RegExp.escape('\\backslashes\\'));
|
||||
this.assertEqual('\\\\border of word', RegExp.escape('\\border of word'));
|
||||
|
||||
this.assertEqual('\\(\\?\\:non-capturing\\)', RegExp.escape('(?:non-capturing)'));
|
||||
this.assertEqual('non-capturing', new RegExp(RegExp.escape('(?:') + '([^)]+)').exec('(?:non-capturing)')[1]);
|
||||
|
||||
this.assertEqual('\\(\\?\\=positive-lookahead\\)', RegExp.escape('(?=positive-lookahead)'));
|
||||
this.assertEqual('positive-lookahead', new RegExp(RegExp.escape('(?=') + '([^)]+)').exec('(?=positive-lookahead)')[1]);
|
||||
|
||||
this.assertEqual('\\(\\?<\\=positive-lookbehind\\)', RegExp.escape('(?<=positive-lookbehind)'));
|
||||
this.assertEqual('positive-lookbehind', new RegExp(RegExp.escape('(?<=') + '([^)]+)').exec('(?<=positive-lookbehind)')[1]);
|
||||
|
||||
this.assertEqual('\\(\\?\\!negative-lookahead\\)', RegExp.escape('(?!negative-lookahead)'));
|
||||
this.assertEqual('negative-lookahead', new RegExp(RegExp.escape('(?!') + '([^)]+)').exec('(?!negative-lookahead)')[1]);
|
||||
|
||||
this.assertEqual('\\(\\?<\\!negative-lookbehind\\)', RegExp.escape('(?<!negative-lookbehind)'));
|
||||
this.assertEqual('negative-lookbehind', new RegExp(RegExp.escape('(?<!') + '([^)]+)').exec('(?<!negative-lookbehind)')[1]);
|
||||
|
||||
this.assertEqual('\\[\\\\w\\]\\+', RegExp.escape('[\\w]+'));
|
||||
this.assertEqual('character class', new RegExp(RegExp.escape('[') + '([^\\]]+)').exec('[character class]')[1]);
|
||||
|
||||
this.assertEqual('<div>', new RegExp(RegExp.escape('<div>')).exec('<td><div></td>')[0]);
|
||||
|
||||
this.assertEqual('false', RegExp.escape(false));
|
||||
this.assertEqual('undefined', RegExp.escape());
|
||||
this.assertEqual('null', RegExp.escape(null));
|
||||
this.assertEqual('42', RegExp.escape(42));
|
||||
|
||||
this.assertEqual('\\\\n\\\\r\\\\t', RegExp.escape('\\n\\r\\t'));
|
||||
this.assertEqual('\n\r\t', RegExp.escape('\n\r\t'));
|
||||
this.assertEqual('\\{5,2\\}', RegExp.escape('{5,2}'));
|
||||
|
||||
this.assertEqual(
|
||||
'\\/\\(\\[\\.\\*\\+\\?\\^\\=\\!\\:\\$\\{\\}\\(\\)\\|\\[\\\\\\]\\\\\\\/\\\\\\\\\\]\\)\\/g',
|
||||
RegExp.escape('/([.*+?^=!:${}()|[\\]\\/\\\\])/g')
|
||||
);
|
||||
}
|
||||
});
|
42
test/unit/tmp/ajax_test.html
Normal file
42
test/unit/tmp/ajax_test.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Ajax</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/ajax.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../ajax_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Ajax</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="content"></div>
|
||||
<div id="content2" style="color:red"></div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
39
test/unit/tmp/array_test.html
Normal file
39
test/unit/tmp/array_test.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Array</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../array_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Array</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="test_node">22<span id="span_1"></span><span id="span_2"></span></div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
45
test/unit/tmp/base_test.html
Normal file
45
test/unit/tmp/base_test.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Base</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/base.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../base_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Base</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="test"></div>
|
||||
<ul id="list">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
40
test/unit/tmp/class_test.html
Normal file
40
test/unit/tmp/class_test.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Class</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/class.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../class_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Class</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/date_test.html
Normal file
38
test/unit/tmp/date_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Date</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../date_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Date</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
319
test/unit/tmp/dom_test.html
Normal file
319
test/unit/tmp/dom_test.html
Normal file
@ -0,0 +1,319 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Dom</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../fixtures/dom.css" type="text/css" charset="utf-8" />
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/dom.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../dom_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Dom</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="scroll_test_1">
|
||||
<p id="scroll_test_2">Scroll test</p>
|
||||
</div>
|
||||
|
||||
<div id="test-visible">visible</div>
|
||||
<div id="test-hidden" style="display:none;">hidden</div>
|
||||
<div id="test-toggle-visible">visible</div>
|
||||
<div id="test-toggle-hidden" style="display:none;">hidden</div>
|
||||
<div id="test-hide-visible">visible</div>
|
||||
<div id="test-hide-hidden" style="display:none;">hidden</div>
|
||||
<div id="test-show-visible">visible</div>
|
||||
<div id="test-show-hidden" style="display:none;">hidden</div>
|
||||
<div id="removable-container"><div id="removable"></div></div>
|
||||
|
||||
<div>
|
||||
<table>
|
||||
<tbody id="table">
|
||||
<tr>
|
||||
<td>Data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="a_cell">First Row</td>
|
||||
</tr>
|
||||
<tr id="second_row">
|
||||
<td>Second Row</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="table-container-to-replace">
|
||||
<table>
|
||||
<tbody id="table-to-replace">
|
||||
<tr>
|
||||
<td>Data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="a_cell-to-replace">First Row</td>
|
||||
</tr>
|
||||
<tr id="second_row-to-replace">
|
||||
<td>Second Row</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="test">Test paragraph outside of container</p>
|
||||
|
||||
<div id="container">
|
||||
<p class="test" id="intended">Test paragraph 1 inside of container</p>
|
||||
<p class="test">Test paragraph 2 inside of container</p>
|
||||
<p class="test">Test paragraph 3 inside of container</p>
|
||||
<p class="test">Test paragraph 4 inside of container</p>
|
||||
</div>
|
||||
|
||||
<div id="testdiv">to be updated</div>
|
||||
<div id="testdiv-replace-container-1"><div id="testdiv-replace-1"></div></div>
|
||||
<div id="testdiv-replace-container-2"><div id="testdiv-replace-2"></div></div>
|
||||
<div id="testdiv-replace-container-3"><div id="testdiv-replace-3"></div></div>
|
||||
<div id="testdiv-replace-container-4"><div id="testdiv-replace-4"></div></div>
|
||||
<div id="testdiv-replace-container-5"><div id="testdiv-replace-5"></div></div>
|
||||
<div id="testdiv-replace-container-element"><div id="testdiv-replace-element"></div></div>
|
||||
<div id="testdiv-replace-container-toelement"><div id="testdiv-replace-toelement"></div></div>
|
||||
<div id="testdiv-replace-container-tohtml"><div id="testdiv-replace-tohtml"></div></div>
|
||||
<div id="testtable-replace-container"><table id="testtable-replace"></table></div>
|
||||
<table id="testrow-replace-container"><tr id="testrow-replace"></tr></table>
|
||||
<select id="testoption-replace-container"><option id="testoption-replace"></option><option>stays</option></select>
|
||||
<div id="testform-replace-container"><p>some text</p><form id="testform-replace"><input id="testinput-replace" type="text" /></form><p>some text</p></div>
|
||||
|
||||
<div id="element_with_visible_overflow" style="overflow:visible">V</div>
|
||||
<div id="element_with_hidden_overflow" style="overflow:hidden">H</div>
|
||||
<div id="element_with_scroll_overflow" style="overflow:scroll">S</div>
|
||||
|
||||
<div id="element_extend_test"> </div>
|
||||
|
||||
<div id="element_reextend_test"><div id="discard_1"></div></div>
|
||||
|
||||
<div id="test_whitespace"> <span> </span>
|
||||
|
||||
|
||||
<div><div></div> </div><span> </span>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="nav_tests_isolator">
|
||||
<div id="nav_test_first_sibling"></div>
|
||||
<div></div>
|
||||
<p id="nav_test_p" class="test"></p>
|
||||
<span id="nav_test_prev_sibling"></span>
|
||||
|
||||
<ul id="navigation_test" style="display: none">
|
||||
<!-- comment node to screw things up -->
|
||||
<li class="first"><em>A</em></li>
|
||||
<li><em class="dim">B</em></li>
|
||||
<li id="navigation_test_c">
|
||||
<em>C</em>
|
||||
<ul>
|
||||
<li><em class="dim">E</em></li>
|
||||
<li id="navigation_test_f"><em>F</em></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="last"><em>D</em></li>
|
||||
</ul>
|
||||
|
||||
<div id="navigation_test_next_sibling">
|
||||
<!-- -->
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
</div>
|
||||
|
||||
<div id="class_names">
|
||||
<p class="A"></p>
|
||||
<ul class="A B" id="class_names_ul">
|
||||
<li class="C"></li>
|
||||
<li class="A C"></li>
|
||||
<li class="1"></li>
|
||||
</ul>
|
||||
<div class="B C D"></div>
|
||||
<div id="unextended"></div>
|
||||
</div>
|
||||
|
||||
<div id="style_test_1" style="display:none;"></div>
|
||||
<div id="style_test_2" class="style-test" style="font-size:11px;"></div>
|
||||
|
||||
<div id="style_test_3">blah</div>
|
||||
<span id="style_test_4">blah</span>
|
||||
<span id="style_test_5">blah</span>
|
||||
|
||||
<div id="style_test_dimensions_container">
|
||||
<div id="style_test_dimensions" style="background:#ddd;padding:1px;margin:1px;border:1px solid #00f"><div style="height:5px;background:#eee;width:5px;padding:2px;margin:2px;border:2px solid #0f0"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="test_csstext_1">test_csstext_1</div>
|
||||
<div id="test_csstext_2">test_csstext_2</div>
|
||||
<div id="test_csstext_3" style="border: 1px solid red">test_csstext_3</div>
|
||||
<div id="test_csstext_4" style="font-size: 20px">test_csstext_4</div>
|
||||
<div id="test_csstext_5">test_csstext_5</div>
|
||||
|
||||
<div id="custom_attributes">
|
||||
<div foo="1" bar="2"></div>
|
||||
<div foo="2"></div>
|
||||
</div>
|
||||
|
||||
<div id="cloned_element_attributes_issue" foo="original"></div>
|
||||
<a id="attributes_with_issues_1" href="test.html" accesskey="L" tabindex="50" title="a link" onclick="alert('hello world');"></a>
|
||||
<a id="attributes_with_issues_2" href="" accesskey="" tabindex="" title=""></a>
|
||||
<a id="attributes_with_issues_3"></a>
|
||||
<form id="attributes_with_issues_form" method="post" action="blah">
|
||||
<input type="checkbox" id="attributes_with_issues_checked" name="a" checked="checked"/>
|
||||
<input type="checkbox" id="attributes_with_issues_disabled" name="b" checked="checked" disabled="disabled"/>
|
||||
<input type="text" id="attributes_with_issues_readonly" name="c" readonly="readonly" value="blech"/>
|
||||
<input type="date" id="attributes_with_issues_type" value="blech" />
|
||||
<select id="attributes_with_issues_multiple" name="e" multiple="multiple">
|
||||
<option>blech</option>
|
||||
<option>blah</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<!-- writeAttributes -->
|
||||
<p id="write_attribute_para"></p>
|
||||
<a id="write_attribute_link" href="test.html"></a>
|
||||
<form action="/dev/null" id="write_attribute_form" method="get" accept-charset="utf-8">
|
||||
<label id="write_attribute_label"></label>
|
||||
<input type="checkbox" name="write_attribute_checkbox" value="" id="write_attribute_checkbox">
|
||||
<input type="checkbox" checked="checked" name="write_attribute_checked_checkbox" value="" id="write_attribute_checked_checkbox">
|
||||
<input type="text" name="write_attribute_input" value="" id="write_attribute_input">
|
||||
<select id="write_attribute_select">
|
||||
<option>Cat</option>
|
||||
<option>Dog</option>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<table id="write_attribute_table" cellpadding="6" cellspacing="4">
|
||||
<tr><td id="write_attribute_td">A</td><td>B</td></tr>
|
||||
<tr><td>C</td></tr>
|
||||
<tr><td>D</td><td>E</td><td>F</td></tr>
|
||||
</table>
|
||||
|
||||
<div id="dom_attribute_precedence">
|
||||
<form action="blech" method="post">
|
||||
<input type="submit" id="update" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="not_floating_none">NFN</div>
|
||||
<div id="not_floating_inline" style="float:none">NFI</div>
|
||||
<div id="not_floating_style">NFS</div>
|
||||
|
||||
<div id="floating_inline" style="float:left">FI</div>
|
||||
<div id="floating_style">FS</div>
|
||||
<!-- Test Element opacity functions -->
|
||||
<img id="op1" alt="op2" src="fixtures/logo.gif" style="opacity:0.5;filter:alpha(opacity=50)" />
|
||||
<img id="op2" alt="op2" src="fixtures/logo.gif"/>
|
||||
<img id="op3" alt="op3" src="fixtures/logo.gif"/>
|
||||
<img id="op4-ie" alt="op3" src="fixtures/logo.gif" style="filter:alpha(opacity=30)" />
|
||||
<div id="dimensions-visible"></div>
|
||||
<div id="dimensions-display-none"></div>
|
||||
<div id="dimensions-visible-pos-rel"></div>
|
||||
<div id="dimensions-display-none-pos-rel"></div>
|
||||
<div id="dimensions-visible-pos-abs"></div>
|
||||
<div id="dimensions-display-none-pos-abs"></div>
|
||||
<table border="0" cellspacing="0" cellpadding="0" id="dimensions-table">
|
||||
<tbody id="dimensions-tbody">
|
||||
<tr id="dimensions-tr">
|
||||
<td id="dimensions-td">Data</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="dimensions-nester" style="width: 500px;">
|
||||
<div id="dimensions-nestee" style="display: none">This is a nested DIV. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p id="test-empty"></p>
|
||||
<p id="test-empty-but-contains-whitespace">
|
||||
|
||||
|
||||
</p>
|
||||
<p id="test-full">content</p>
|
||||
<div id="ancestor">
|
||||
<div id="child">
|
||||
<div id="grand-child">
|
||||
<div id="great-grand-child"></div>
|
||||
</div></div><!-- intentional formatting; don't change this line -->
|
||||
<div id="sibling"><div id="grand-sibling"></div></div>
|
||||
</div>
|
||||
<div id="not-in-the-family"></div>
|
||||
|
||||
<div id="insertions-container"><div id="insertions-main"><p>some content.</p></div></div>
|
||||
<div id="insertions-node-container"><div id="insertions-node-main"><p>some content.</p></div></div>
|
||||
<div id="element-insertions-container"><div id="element-insertions-main"><p>some content.</p></div></div>
|
||||
<div id="element-insertions-multiple-container"><div id="element-insertions-multiple-main"><p>some content.</p></div></div>
|
||||
<table id="table_for_insertions"></table>
|
||||
<table id="table_for_row_insertions"><tr id="row_1"></tr></table>
|
||||
<form method="post" action="blah">
|
||||
<select id="select_for_update" name="select_for_update">
|
||||
<option>option 1</option>
|
||||
<option>option 2</option>
|
||||
</select>
|
||||
<select id="select_for_insert_bottom" name="select_for_insert_bottom">
|
||||
<option>option 1</option>
|
||||
<option>option 2</option>
|
||||
</select>
|
||||
<select id="select_for_insert_top" name="select_for_insert_top">
|
||||
<option>option 1</option>
|
||||
<option>option 2</option>
|
||||
</select>
|
||||
</form>
|
||||
<div id="wrap-container"><p id="wrap"></p></div>
|
||||
|
||||
<!-- Positioning methods bench -->
|
||||
<div id="body_absolute" style="position: absolute; top: 10px; left: 10px">
|
||||
<div id="absolute_absolute" style="position: absolute; top: 10px; left:10px"> </div>
|
||||
<div id="absolute_relative" style="position: relative; top: 10px; left:10px">
|
||||
<div style="height:10px;font-size:2px">test<span id="inline">test</span></div>
|
||||
<div id="absolute_relative_undefined">XYZ</div>
|
||||
</div>
|
||||
<div id="absolute_fixed" style="position: fixed; top: 10px; left: 10px">
|
||||
<span id="absolute_fixed_absolute" style="position: absolute; top: 10px; left: 10px">foo</span>
|
||||
<span id="absolute_fixed_undefined" style="display:block">bar</span>
|
||||
</div></div>
|
||||
<div id="notInlineAbsoluted"></div>
|
||||
<div id="inlineAbsoluted" style="position: absolute"></div>
|
||||
|
||||
<div id="unextended"></div>
|
||||
<div id="identification">
|
||||
<div id="predefined_id"></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div id="anonymous_element_3"></div>
|
||||
</div>
|
||||
|
||||
<div id='elementToViewportDimensions' style='display: none'></div>
|
||||
<div id="auto_dimensions" style="height:auto"></div>
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
43
test/unit/tmp/element_mixins_test.html
Normal file
43
test/unit/tmp/element_mixins_test.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Element mixins</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/element_mixins.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../element_mixins_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Element mixins</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<form id="form">
|
||||
<input type="text" id="input" value="4" />
|
||||
<input type="submit" />
|
||||
</form>
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
48
test/unit/tmp/enumerable_test.html
Normal file
48
test/unit/tmp/enumerable_test.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Enumerable</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/enumerable.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../enumerable_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Enumerable</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<table id="grepTable">
|
||||
<tbody id="grepTBody">
|
||||
<tr id="grepRow">
|
||||
<th id="grepHeader" class="cell"></th>
|
||||
<td id="grepCell" class="cell"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
42
test/unit/tmp/event_test.html
Normal file
42
test/unit/tmp/event_test.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Event</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../event_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Event</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="outer" style="display: none">
|
||||
<p id="inner">One two three <span id="span">four</span></p>
|
||||
</div>
|
||||
<div id="container"><div></div></div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
146
test/unit/tmp/form_test.html
Normal file
146
test/unit/tmp/form_test.html
Normal file
@ -0,0 +1,146 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Form</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../form_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Form</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<form id="form" method="get" action="fixtures/empty.js">
|
||||
<input type="text" name="val1" id="input_enabled" value="4" />
|
||||
<div>This is not a form element</div>
|
||||
<input type="text" name="val2" id="input_disabled" disabled="disabled" value="5" />
|
||||
<input type="submit" name="first_submit" value="Commit it!" />
|
||||
<input type="submit" name="second_submit" value="Delete it!" />
|
||||
<input type="text" name="action" value="blah" />
|
||||
</form>
|
||||
|
||||
<form id="bigform" method="get" action="fixtures/empty.js">
|
||||
<div id="inputs">
|
||||
<input type="text" name="dummy" id="dummy_disabled" disabled="disabled"/>
|
||||
<input type="submit" name="commit" id="submit" />
|
||||
<input type="button" name="clicky" value="click me" />
|
||||
<input type="reset" name="revert" />
|
||||
<input type="text" name="greeting" id="focus_text" value="Hello" />
|
||||
</div>
|
||||
|
||||
<!-- some edge cases in serialization -->
|
||||
<div id="value_checks">
|
||||
<input name="twin" type="text" value="" />
|
||||
<input name="twin" type="text" value="siamese" />
|
||||
<!-- Rails checkbox hack with hidden input: -->
|
||||
<input name="checky" type="checkbox" id="checkbox_hack" value="1" />
|
||||
<input name="checky" type="hidden" value="0" />
|
||||
</div>
|
||||
|
||||
<!-- all variations of SELECT controls -->
|
||||
<div id="selects_wrapper">
|
||||
<select name="vu">
|
||||
<option value="1" selected="selected">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<select id="multiSel1" name="vm[]" multiple="multiple">
|
||||
<option id="multiSel1_opt1" value="1" selected="selected">One</option>
|
||||
<option id="multiSel1_opt2" value="2">Two</option>
|
||||
<option id="multiSel1_opt3" value="3" selected="selected">Three</option>
|
||||
</select>
|
||||
<select name="nvu">
|
||||
<option selected="selected">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
|
||||
<fieldset id="selects_fieldset">
|
||||
<select name="nvm[]" multiple="multiple">
|
||||
<option selected="selected">One</option>
|
||||
<option>Two</option>
|
||||
<option selected="selected">Three</option>
|
||||
</select>
|
||||
<select name="evu">
|
||||
<option value="" selected="selected">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<select name="evm[]" multiple="multiple">
|
||||
<option value="" selected="selected">One</option>
|
||||
<option>Two</option>
|
||||
<option selected="selected">Three</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="various">
|
||||
<select name="tf_selectOne"><option selected="selected"></option><option>1</option></select>
|
||||
<textarea name="tf_textarea"></textarea>
|
||||
<input type="checkbox" name="tf_checkbox" value="on" />
|
||||
<select name="tf_selectMany" multiple="multiple"></select>
|
||||
<input type="text" name="tf_text" />
|
||||
<div>This is not a form element</div>
|
||||
<input type="radio" name="tf_radio" value="on" />
|
||||
<input type="hidden" name="tf_hidden" />
|
||||
<input type="password" name="tf_password" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="form_focus_hidden" style="display: none">
|
||||
<input type="text" />
|
||||
</form>
|
||||
|
||||
<form id="form_with_file_input">
|
||||
<input type="file" name="file_name" value="foo" />
|
||||
</form>
|
||||
|
||||
<!-- tabindexed forms -->
|
||||
<div id="tabindex">
|
||||
<form id="ffe">
|
||||
<p><input type="text" disabled="disabled" id="ffe_disabled" /></p>
|
||||
<input type="hidden" id="ffe_hidden" />
|
||||
<input type="checkbox" id="ffe_checkbox" />
|
||||
</form>
|
||||
|
||||
<form id="ffe_ti">
|
||||
<p><input type="text" disabled="disabled" id="ffe_ti_disabled" /></p>
|
||||
<input type="hidden" id="ffe_ti_hidden" />
|
||||
<input type="checkbox" id="ffe_ti_checkbox" />
|
||||
<input type="submit" id="ffe_ti_submit" tabindex="1" />
|
||||
</form>
|
||||
|
||||
<form id="ffe_ti2">
|
||||
<p><input type="text" disabled="disabled" id="ffe_ti2_disabled" /></p>
|
||||
<input type="hidden" id="ffe_ti2_hidden" />
|
||||
<input type="checkbox" id="ffe_ti2_checkbox" tabindex="0" />
|
||||
<input type="submit" id="ffe_ti2_submit" tabindex="1" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
40
test/unit/tmp/function_test.html
Normal file
40
test/unit/tmp/function_test.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Function</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/function.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../function_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Function</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
40
test/unit/tmp/hash_test.html
Normal file
40
test/unit/tmp/hash_test.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Hash</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/hash.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../hash_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Hash</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/number_test.html
Normal file
38
test/unit/tmp/number_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Number</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../number_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Number</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
45
test/unit/tmp/object_test.html
Normal file
45
test/unit/tmp/object_test.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Object</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/object.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../object_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Object</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="test"></div>
|
||||
<ul id="list">
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/periodical_executer_test.html
Normal file
38
test/unit/tmp/periodical_executer_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Periodical executer</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../periodical_executer_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Periodical executer</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
47
test/unit/tmp/position_test.html
Normal file
47
test/unit/tmp/position_test.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Position</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../position_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Position</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="ensure_scrollbars" style="width:10000px; height:10000px; position:absolute" > </div>
|
||||
|
||||
<div id="body_absolute" style="position: absolute; top: 10px; left: 10px">
|
||||
<div id="absolute_absolute" style="position: absolute; top: 10px; left:10px"> </div>
|
||||
<div id="absolute_relative" style="position: relative; top: 10px; left:10px">
|
||||
<div style="height:10px;font-size:2px">test<span id="inline">test</span></div>
|
||||
<div id="absolute_relative_undefined"> </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/prototype_test.html
Normal file
38
test/unit/tmp/prototype_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Prototype</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../prototype_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Prototype</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/range_test.html
Normal file
38
test/unit/tmp/range_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Range</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../range_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Range</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
38
test/unit/tmp/regexp_test.html
Normal file
38
test/unit/tmp/regexp_test.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Regexp</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../regexp_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Regexp</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
107
test/unit/tmp/selector_test.html
Normal file
107
test/unit/tmp/selector_test.html
Normal file
@ -0,0 +1,107 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Selector</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../selector_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Selector</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="fixtures" style="display: none">
|
||||
<h1 class="title">Some title <span>here</span></h1>
|
||||
<p id="p" class="first summary">
|
||||
<strong id="strong">This</strong> is a short blurb
|
||||
<a id="link_1" class="first internal" rel="external nofollow" href="#">with a <em id="em2">link</em></a> or
|
||||
<a id="link_2" class="internal highlight" href="#"><em id="em">two</em></a>.
|
||||
Or <cite id="with_title" title="hello world!">a citation</cite>.
|
||||
</p>
|
||||
<ul id="list">
|
||||
<li id="item_1" class="first"><a id="link_3" href="#" class="external"><span id="span">Another link</span></a></li>
|
||||
<li id="item_2">Some text</li>
|
||||
<li id="item_3" xml:lang="es-us" class="">Otra cosa</li>
|
||||
</ul>
|
||||
|
||||
<!-- this form has a field with the name 'id',
|
||||
therefore its ID property won't be 'troubleForm': -->
|
||||
<form id="troubleForm">
|
||||
<input type="hidden" name="id" id="hidden" />
|
||||
<input type="text" name="disabled_text_field" id="disabled_text_field" disabled="disabled" />
|
||||
<input type="text" name="enabled_text_field" id="enabled_text_field" />
|
||||
<input type="checkbox" name="checkboxes" id="checked_box" checked="checked" value="Checked" />
|
||||
<input type="checkbox" name="checkboxes" id="unchecked_box" value="Unchecked"/>
|
||||
<input type="radio" name="radiobuttons" id="checked_radio" checked="checked" value="Checked" />
|
||||
<input type="radio" name="radiobuttons" id="unchecked_radio" value="Unchecked" />
|
||||
</form>
|
||||
|
||||
<form id="troubleForm2">
|
||||
<input type="checkbox" name="brackets[5][]" id="chk_1" checked="checked" value="1" />
|
||||
<input type="checkbox" name="brackets[5][]" id="chk_2" value="2" />
|
||||
</form>
|
||||
|
||||
<div id="level1">
|
||||
<span id="level2_1">
|
||||
<span id="level3_1"></span>
|
||||
<!-- This comment should be ignored by the adjacent selector -->
|
||||
<span id="level3_2"></span>
|
||||
</span>
|
||||
<span id="level2_2">
|
||||
<em id="level_only_child">
|
||||
</em>
|
||||
</span>
|
||||
<div id="level2_3"></div>
|
||||
</div> <!-- #level1 -->
|
||||
|
||||
<div id="dupContainer">
|
||||
<span id="dupL1" class="span_foo span_bar">
|
||||
<span id="dupL2">
|
||||
<span id="dupL3">
|
||||
<span id="dupL4">
|
||||
<span id="dupL5"></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div> <!-- #dupContainer -->
|
||||
|
||||
<div id="grandfather"> grandfather
|
||||
<div id="father" class="brothers men"> father
|
||||
<div id="son"> son </div>
|
||||
</div>
|
||||
<div id="uncle" class="brothers men"> uncle </div>
|
||||
</div>
|
||||
|
||||
<form id="commaParent" title="commas,are,good">
|
||||
<input type="hidden" id="commaChild" name="foo" value="#commaOne,#commaTwo" />
|
||||
<input type="hidden" id="commaTwo" name="foo2" value="oops" />
|
||||
</form>
|
||||
<div id="counted_container"><div class="is_counted"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
40
test/unit/tmp/string_test.html
Normal file
40
test/unit/tmp/string_test.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | String</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../fixtures/string.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../string_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>String</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
56
test/unit/tmp/unittest_test.html
Normal file
56
test/unit/tmp/unittest_test.html
Normal file
@ -0,0 +1,56 @@
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Prototype Unit test file | Unittest</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var eventResults = {};
|
||||
var originalElement = window.Element;
|
||||
</script>
|
||||
<script src="../../../dist/prototype.js" type="text/javascript"></script>
|
||||
<script src="../../lib/assets/unittest.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="../../lib/assets/test.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="../unittest_test.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Prototype Unit test file</h1>
|
||||
<h2>Unittest</h2>
|
||||
|
||||
<!-- This file is programmatically generated. Do not attempt to modify it. Instead, modify -->
|
||||
|
||||
<!-- Log output start -->
|
||||
<div id="testlog"></div>
|
||||
<!-- Log output end -->
|
||||
|
||||
<!-- HTML Fixtures start -->
|
||||
<div id="testlog_2"> </div>
|
||||
|
||||
<!-- Test elements follow -->
|
||||
<div id="test_1" class="a bbbbbbbbbbbb cccccccccc dddd"> </div>
|
||||
|
||||
<div id="test_2"> <span> </span>
|
||||
|
||||
|
||||
|
||||
<div><div></div> </div><span> </span>
|
||||
</div>
|
||||
|
||||
<ul id="tlist"><li id="tlist_1">x1</li><li id="tlist_2">x2</li></ul>
|
||||
<ul id="tlist2"><li class="a" id="tlist2_1">x1</li><li id="tlist2_2">x2</li></ul>
|
||||
|
||||
<div id="testmoveby" style="background-color:#333;width:100px;">XXXX</div>
|
||||
|
||||
<div id="testcss1">testcss1<span id="testcss1_span" style="display:none;">blah</span></div><div id="testcss2">testcss1</div>
|
||||
|
||||
<!-- HTML Fixtures end -->
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
eventResults.endOfDocument = true;
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user