Index: test/mjsunit/harmony/object-observe.js |
diff --git a/test/mjsunit/harmony/object-observe.js b/test/mjsunit/harmony/object-observe.js |
index 584d9e82d649879f380f60ef5fb94e0458a86596..263154a406a525a1dd652f8da1dda5363ed74901 100644 |
--- a/test/mjsunit/harmony/object-observe.js |
+++ b/test/mjsunit/harmony/object-observe.js |
@@ -26,7 +26,7 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// Flags: --harmony-observation --harmony-proxies --harmony-collections |
-// Flags: --allow-natives-syntax |
+// Flags: --harmony-symbols --allow-natives-syntax |
var allObservers = []; |
function reset() { |
@@ -448,6 +448,29 @@ observer.assertCallbackRecords([ |
]); |
+// Observing symbol properties (not). |
+print("*****") |
+reset(); |
+var obj = {} |
+var symbol = Symbol("secret"); |
+Object.observe(obj, observer.callback); |
+obj[symbol] = 3; |
+delete obj[symbol]; |
+Object.defineProperty(obj, symbol, {get: function() {}, configurable: true}); |
+Object.defineProperty(obj, symbol, {value: 6}); |
+Object.defineProperty(obj, symbol, {writable: false}); |
+delete obj[symbol]; |
+Object.defineProperty(obj, symbol, {value: 7}); |
+++obj[symbol]; |
+obj[symbol]++; |
+obj[symbol] *= 3; |
+delete obj[symbol]; |
+obj.__defineSetter__(symbol, function() {}); |
+obj.__defineGetter__(symbol, function() {}); |
+Object.deliverChangeRecords(observer.callback); |
+observer.assertNotCalled(); |
+ |
+ |
// Test all kinds of objects generically. |
function TestObserveConfigurable(obj, prop) { |
reset(); |