Lines Matching refs:obj1
65 var obj1 = {}; variable
117 assertThrows(function() { Reflect.defineProperty(obj1, "foo", undefined) },
122 assertTrue(Reflect.defineProperty(obj1, "foo", emptyDesc));
125 assertEquals(undefined, obj1.foo);
129 var desc = Object.getOwnPropertyDescriptor(obj1, "foo");
140 desc = Object.getOwnPropertyDescriptor(obj1, "bar");
144 assertFalse(Reflect.defineProperty(obj1, "foo", accessorConfigurable));
149 assertTrue(Reflect.defineProperty(obj1, "bar", accessorConfigurable));
150 desc = Object.getOwnPropertyDescriptor(obj1, "bar");
157 assertEquals(1, obj1.bar = 1);
159 assertEquals(1, obj1.bar = 1);
161 assertEquals(2, obj1.bar);
164 assertTrue(Reflect.defineProperty(obj1, "bar", accessorNoConfigurable));
165 desc = Object.getOwnPropertyDescriptor(obj1, "bar");
172 assertEquals(1, obj1.bar = 1);
175 assertEquals(1, obj1.bar = 1)
178 assertEquals(2, obj1.bar);
181 assertFalse(Reflect.defineProperty(obj1, "bar", accessorConfigurable));
184 assertFalse(Reflect.defineProperty(obj1, "bar", dataConfigurable));
187 assertTrue(Reflect.defineProperty(obj1, "bar", accessorNoConfigurable));
188 desc = Object.getOwnPropertyDescriptor(obj1, "bar");
195 assertEquals(1, obj1.bar = 1);
198 assertEquals(1, obj1.bar = 1)
201 assertEquals(4, obj1.bar);
204 assertTrue(Reflect.defineProperty(obj1, "setOnly", accessorOnlySet));
205 desc = Object.getOwnPropertyDescriptor(obj1, "setOnly");
212 assertEquals(1, obj1.setOnly = 1);
216 assertTrue(Reflect.defineProperty(obj1, "setOnly", accessorOnlyGet));
217 desc = Object.getOwnPropertyDescriptor(obj1, "setOnly");
224 assertEquals(1, obj1.setOnly = 1);
229 assertTrue(Reflect.defineProperty(obj1, "both", accessorConfigurable));
231 assertTrue(Reflect.defineProperty(obj1, "both", accessorOnlySet));
232 desc = Object.getOwnPropertyDescriptor(obj1, "both");
239 assertEquals(1, obj1.both = 1);
245 assertTrue(Reflect.defineProperty(obj1, "foobar", dataConfigurable));
246 desc = Object.getOwnPropertyDescriptor(obj1, "foobar");
247 assertEquals(obj1.foobar, 1000);
255 obj1.foobar = 1001;
256 assertEquals(obj1.foobar, 1000);
260 assertTrue(Reflect.defineProperty(obj1, "foobar", dataWritable));
261 desc = Object.getOwnPropertyDescriptor(obj1, "foobar");
262 assertEquals(obj1.foobar, 3000);
272 obj1.foobar = 1001;
273 assertEquals(obj1.foobar, 1001);
277 assertTrue(Reflect.defineProperty(obj1, "foobar", dataNoConfigurable));
278 desc = Object.getOwnPropertyDescriptor(obj1, "foobar");
279 assertEquals(obj1.foobar, 2000);
288 assertFalse(Reflect.defineProperty(obj1, "foobar", dataConfigurable));
291 assertFalse(Reflect.defineProperty(obj1, "foobar", dataConfigurable));
295 assertTrue(Reflect.defineProperty(obj1, "foobar", dataNoConfigurable));
296 desc = Object.getOwnPropertyDescriptor(obj1, "foobar");
297 assertEquals(obj1.foobar, 2000);
1010 obj1 = {};
1012 Reflect.defineProperty(obj1, "quebec", { get: getter, configurable: true }));
1013 obj2 = Object.create(obj1);
1022 assertTrue(Reflect.defineProperty(obj1, "quebec", { get: anotherGetter }));
1041 obj1 = {};
1043 Reflect.defineProperty(obj1, "romeo", { set: setter, configurable: true }));
1044 obj2 = Object.create(obj1);
1053 assertTrue(Reflect.defineProperty(obj1, "romeo", { set: anotherSetter }));
1067 obj1 = {};
1068 assertTrue(Reflect.defineProperty(obj1, "sierra",
1070 obj2 = Object.create(obj1);
1079 assertTrue(Reflect.defineProperty(obj1, "sierra",