Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / js1_8_5 / extensions / set-property-non-extensible.js
1 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/licenses/publicdomain/
3
4 //-----------------------------------------------------------------------------
5 var BUGNUMBER = 600128;
6 var summary =
7   "Properly handle attempted addition of properties to non-extensible objects";
8
9 print(BUGNUMBER + ": " + summary);
10
11 /**************
12  * BEGIN TEST *
13  **************/
14
15 var o = Object.freeze({});
16 for (var i = 0; i < 10; i++)
17   print(o.u = "");
18
19 Object.freeze(this);
20 for (let j = 0; j < 10; j++)
21   print(u = "");
22
23
24 /******************************************************************************/
25
26 if (typeof reportCompare === "function")
27   reportCompare(true, true);
28
29 print("All tests passed!");