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

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: Reupload 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..a6831c09633a41a385e69307dc7e39538c306faf 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() {
+ try {
arv (Not doing code reviews) 2015/03/12 17:56:25 Here is another way to write this: var ex; try {
+ Object.observe({}, function(){}, "not an object");
+ } catch (e) {
+ assertInstanceof(e, TypeError);
+ assertEquals("Object.observe accept must be an array of strings.",
+ e.message);
caitp (gmail) 2015/03/12 18:00:17 kind of a nit, but the observe_invalid_accept mess
+ return;
+ }
+ fail("TypeError", "no exception");
+})()
« 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