Lines Matching defs:obj2
50 var obj2 = {};
51 assertTrue(Object.isExtensible(obj2));
52 obj2.x = 42;
53 assertEquals(42, obj2.x);
54 assertTrue(Object.isExtensible(obj2));
56 assertTrue(Reflect.preventExtensions(obj2));
57 assertEquals(42, obj2.x);
59 obj2.y = 42;
60 // obj2.y should still be undefined.
61 assertEquals(undefined, obj2.y);
63 obj2.x = 43;
64 assertEquals(43, obj2.x)
66 obj2.y = new function() { return 42; };
67 // obj2.y should still be undefined.
68 assertEquals(undefined, obj2.y);
69 assertEquals(43, obj2.x)
72 Object.defineProperty(obj2, "y", {value: 42});
77 // obj2.y should still be undefined.
78 assertEquals(undefined, obj2.y);
79 assertEquals(43, obj2.x);
81 obj2[1] = 42;
82 assertEquals(undefined, obj2[1]);
144 obj2 = { prop1: 3, prop2: 4 };
145 assertTrue(%HaveSameMap(obj, obj2));
147 assertTrue(Reflect.preventExtensions(obj2));
149 assertFalse(Object.isExtensible(obj2));
151 assertFalse(Object.isSealed(obj2));
152 assertTrue(%HaveSameMap(obj, obj2));
156 obj2 = { prop1: 3, prop2: 4, 150: 'bar' };
157 assertTrue(%HaveSameMap(obj, obj2));
159 assertTrue(Reflect.preventExtensions(obj2));
161 assertFalse(Object.isExtensible(obj2));
163 assertFalse(Object.isSealed(obj2));
164 assertTrue(%HaveSameMap(obj, obj2));