Searched defs:preventExtensions (Results 1 - 1 of 1) sorted by relevance

/external/chromium_org/v8/test/webkit/
H A DpreventExtensions.js64 function preventExtensions(obj) function
66 Object.preventExtensions(obj);
73 preventExtensions(inextensible);
88 shouldBe('test(preventExtensions(obj()))', '"(b:4)"'); // <nothing>, can delete a, can modify b, and CANNOT add c
92 // check that we can preventExtensions on a host function.
93 shouldBe('Object.preventExtensions(Math.sin)', 'Math.sin');
95 shouldThrow('var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
96 shouldThrow('"use strict"; var o = {}; Object.preventExtensions(o); o.__proto__ = { newProp: "Should not see this" }; o.newProp;');
98 // check that we can still access static properties on an object after calling preventExtensions.
99 shouldBe('Object.preventExtensions(Mat
[all...]

Completed in 925 milliseconds