tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / js / kde / script-tests / prototype_length.js
1 shouldBe("Object.prototype.length","undefined");
2 shouldBe("Function.prototype.length","0");
3 shouldBe("Array.prototype.length","0");
4 shouldBe("String.prototype.length","0");
5 shouldBe("Boolean.prototype.length","undefined");
6 shouldBe("Number.prototype.length","undefined");
7 shouldBe("Date.prototype.length","undefined");
8 shouldBe("RegExp.prototype.length","undefined");
9 shouldBe("Error.prototype.length","undefined");
10
11 // check !ReadOnly
12 Array.prototype.length = 6;
13 shouldBe("Array.prototype.length","6");
14 // check ReadOnly
15 Function.prototype.length = 7;
16 shouldBe("Function.prototype.length","0");
17 String.prototype.length = 8;
18 shouldBe("String.prototype.length","0");
19
20 // check DontDelete
21 shouldBe("delete Array.prototype.length","false");
22 shouldBe("delete Function.prototype.length","false");
23 shouldBe("delete String.prototype.length","false");
24
25 // check DontEnum
26 var foundArrayPrototypeLength = false;
27 for (i in Array.prototype) { if (i == "length") foundArrayPrototypeLength = true; }
28 shouldBe("foundArrayPrototypeLength","false");
29
30 var foundFunctionPrototypeLength = false;
31 for (i in Function.prototype) { if (i == "length") foundFunctionPrototypeLength = true; }
32 shouldBe("foundFunctionPrototypeLength","false");
33
34 var foundStringPrototypeLength = false;
35 for (i in String.prototype) { if (i == "length") foundStringPrototypeLength = true; }
36 shouldBe("foundStringPrototypeLength","false");