Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: test/mjsunit/es7/object-observe.js

Issue 1005553003: Fix error message for Object.observe accept argument (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve error message, simplify test Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/object-observe.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es7/object-observe.js
diff --git a/test/mjsunit/es7/object-observe.js b/test/mjsunit/es7/object-observe.js
index 99fa38a8573f1f2db70b3c2a0875d61132202c8b..ad47da56513e02cc1f11b43dfae008b16d11365d 100644
--- a/test/mjsunit/es7/object-observe.js
+++ b/test/mjsunit/es7/object-observe.js
@@ -1824,3 +1824,16 @@ for (var b1 = 0; b1 < 2; ++b1)
{ object: fun, type: 'add', name: 'name' },
]);
})();
+
+
+(function TestObserveInvalidAcceptMessage() {
+ var ex;
+ try {
+ Object.observe({}, function(){}, "not an object");
+ } catch (e) {
+ ex = e;
+ }
+ assertInstanceof(ex, TypeError);
+ assertEquals("Third argument to Object.observe must be an array of strings.",
+ ex.message);
+})()
« no previous file with comments | « src/object-observe.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698