| Index: test/webkit/fast/js/kde/prototype_length.js
|
| diff --git a/test/webkit/has-own-property.js b/test/webkit/fast/js/kde/prototype_length.js
|
| similarity index 51%
|
| copy from test/webkit/has-own-property.js
|
| copy to test/webkit/fast/js/kde/prototype_length.js
|
| index 0e0e9ec68ba6dd14a54a39f15cd73fb5cc1ef187..2936fa55a948386e99375e451b82be6288a0424b 100644
|
| --- a/test/webkit/has-own-property.js
|
| +++ b/test/webkit/fast/js/kde/prototype_length.js
|
| @@ -21,14 +21,40 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -description(
|
| -"This test verifies the behaviour of Object.prototype.hasOwnProperty, as documented in ECMA-262 rev3 section 15.2.4.5."
|
| -);
|
| +description("KDE JS Test");
|
| +shouldBe("Object.prototype.length","undefined");
|
| +shouldBe("Function.prototype.length","0");
|
| +shouldBe("Array.prototype.length","0");
|
| +shouldBe("String.prototype.length","0");
|
| +shouldBe("Boolean.prototype.length","undefined");
|
| +shouldBe("Number.prototype.length","undefined");
|
| +shouldBe("Date.prototype.length","undefined");
|
| +shouldBe("RegExp.prototype.length","undefined");
|
| +shouldBe("Error.prototype.length","undefined");
|
|
|
| -shouldBe("typeof {foo : 'yum'}.hasOwnProperty", '"function"');
|
| +// check !ReadOnly
|
| +Array.prototype.length = 6;
|
| +shouldBe("Array.prototype.length","6");
|
| +// check ReadOnly
|
| +Function.prototype.length = 7;
|
| +shouldBe("Function.prototype.length","0");
|
| +String.prototype.length = 8;
|
| +shouldBe("String.prototype.length","0");
|
|
|
| -shouldBeTrue("({foo : 'yum'}).hasOwnProperty('foo')");
|
| -shouldBeTrue("''.hasOwnProperty('length')");
|
| -shouldBeFalse("({foo : 'yum'}).hasOwnProperty('bar')");
|
| -shouldBeFalse("({foo : 'yum'}).hasOwnProperty('toString')");
|
| -shouldBeFalse("''.hasOwnProperty('toString')");
|
| +// check DontDelete
|
| +shouldBe("delete Array.prototype.length","false");
|
| +shouldBe("delete Function.prototype.length","false");
|
| +shouldBe("delete String.prototype.length","false");
|
| +
|
| +// check DontEnum
|
| +var foundArrayPrototypeLength = false;
|
| +for (i in Array.prototype) { if (i == "length") foundArrayPrototypeLength = true; }
|
| +shouldBe("foundArrayPrototypeLength","false");
|
| +
|
| +var foundFunctionPrototypeLength = false;
|
| +for (i in Function.prototype) { if (i == "length") foundFunctionPrototypeLength = true; }
|
| +shouldBe("foundFunctionPrototypeLength","false");
|
| +
|
| +var foundStringPrototypeLength = false;
|
| +for (i in String.prototype) { if (i == "length") foundStringPrototypeLength = true; }
|
| +shouldBe("foundStringPrototypeLength","false");
|
|
|