tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / js / script-tests / isPrototypeOf.js
1 description(
2 "This tests that isPrototypeOf works according to the ECMA spec."
3 );
4
5 shouldBeFalse("Object.isPrototypeOf('string')");
6 shouldBeTrue("Array.prototype.isPrototypeOf(new Array())");
7
8 function ObjectA() { }
9 function ObjectB() { }
10 ObjectB.prototype = new ObjectA();
11 var objb = new ObjectB();
12 shouldBeTrue("ObjectA.prototype.isPrototypeOf(objb)");
13
14 function ObjectC() {}
15 ObjectC.prototype = new ObjectB();
16 var objc = new ObjectC();
17 shouldBeTrue("ObjectA.prototype.isPrototypeOf(objc)");