Lines Matching defs:obj1
38 var obj1, obj2, obj3, obj4;
41 obj1 = {};
42 dp(obj1, "alpha", { get: getter });
45 assertTrue(%HaveSameMap(obj1, obj2));
48 obj1 = {};
49 obj1.__defineGetter__("bravo", getter);
50 assertEquals(getter, obj1.__lookupGetter__("bravo"));
54 assertTrue(%HaveSameMap(obj1, obj2));
57 obj1 = {};
58 dp(obj1, "charlie", { set: setter });
61 assertTrue(%HaveSameMap(obj1, obj2));
64 obj1 = {};
65 obj1.__defineSetter__("delta", setter);
66 assertEquals(setter, obj1.__lookupSetter__("delta"));
70 assertTrue(%HaveSameMap(obj1, obj2));
73 obj1 = {};
74 dp(obj1, "foxtrot", { get: getter, set: setter });
77 assertTrue(%HaveSameMap(obj1, obj2));
80 obj1 = {};
81 dp(obj1, "golf", { get: getter, configurable: true });
82 dp(obj1, "golf", { set: setter, configurable: true });
86 assertTrue(%HaveSameMap(obj1, obj2));
89 obj1 = {};
90 obj1.__defineGetter__("hotel", getter);
91 obj1.__defineSetter__("hotel", setter);
95 assertTrue(%HaveSameMap(obj1, obj2));
98 obj1 = {};
99 dp(obj1, "india", { get: getter, configurable: true, enumerable: true });
100 assertEquals(getter, gop(obj1, "india").get);
101 assertTrue(gop(obj1, "india").configurable);
102 assertTrue(gop(obj1, "india").enumerable);
103 dp(obj1, "india", { enumerable: false });
104 assertEquals(getter, gop(obj1, "india").get);
105 assertTrue(gop(obj1, "india").configurable);
106 assertFalse(gop(obj1, "india").enumerable);
109 obj1 = {};
110 dp(obj1, "juliet", { set: setter, configurable: true, enumerable: false });
111 assertEquals(setter, gop(obj1, "juliet").set);
112 assertTrue(gop(obj1, "juliet").configurable);
113 assertFalse(gop(obj1, "juliet").enumerable);
119 dp(obj1, "juliet", { set: setter, configurable: false, enumerable: true });
120 assertEquals(setter, gop(obj1, "juliet").set);
121 assertFalse(gop(obj1, "juliet").configurable);
122 assertTrue(gop(obj1, "juliet").enumerable);
128 obj1 = {};
129 dp(obj1, "kilo", { get: getter });
132 assertEquals(getter, gop(obj1, "kilo").get);
134 assertFalse(%HaveSameMap(obj1, obj2));
137 obj1 = {};
138 dp(obj1, "lima", { get: getter, set: setter });
141 assertEquals(setter, gop(obj1, "lima").set);
143 assertFalse(%HaveSameMap(obj1, obj2));
146 obj1 = {};
147 dp(obj1, "mike", { get: undefined });
148 assertTrue("mike" in obj1);
149 assertEquals(undefined, gop(obj1, "mike").get);
150 assertEquals(undefined, obj1.__lookupGetter__("mike"));
151 assertEquals(undefined, gop(obj1, "mike").set);
152 assertEquals(undefined, obj1.__lookupSetter__("mike"));
155 obj1 = {};
156 dp(obj1, "november", { set: undefined });
157 assertTrue("november" in obj1);
158 assertEquals(undefined, gop(obj1, "november").get);
159 assertEquals(undefined, obj1.__lookupGetter__("november"));
160 assertEquals(undefined, gop(obj1, "november").set);
161 assertEquals(undefined, obj1.__lookupSetter__("november"));
164 obj1 = {};
165 obj1.oscar = 12345;
166 dp(obj1, "oscar", { set: setter });
167 assertEquals(setter, gop(obj1, "oscar").set);
170 obj1 = {};
171 dp(obj1, "papa", { get: getter, configurable: true });
172 dp(obj1, "papa", { get: getter, set: setter, configurable: true });
173 assertEquals(getter, gop(obj1, "papa").get);
174 assertEquals(setter, gop(obj1, "papa").set);
175 assertTrue(gop(obj1, "papa").configurable);
176 assertFalse(gop(obj1, "papa").enumerable);
179 obj1 = {};
180 dp(obj1, "quebec", { get: getter });
181 obj2 = Object.create(obj1);
187 obj1 = {};
188 dp(obj1, "romeo", { set: setter });
189 obj2 = Object.create(obj1);