WeakMap-set-returns-this.js (247B)
1 // Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and 2 // Set.prototype.add should be chainable 3 4 var wm = new WeakMap(); 5 var bar = {}; 6 assertEq(wm.set(bar, 'BAR'), wm); 7 var foo = {}; 8 var a = wm.set(foo, 'FOO').get(foo); 9 assertEq(a, 'FOO');