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

Unified Diff: test/mjsunit/messages.js

Issue 2825123002: Revert of [errors] Improve NotGeneric error message (Closed)
Patch Set: Created 3 years, 8 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/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/messages.js
diff --git a/test/mjsunit/messages.js b/test/mjsunit/messages.js
index ff91185a7270a6025302e8f8e44f912a262b74f5..9c250048612946b54e103c6150f4a6060d16872a 100644
--- a/test/mjsunit/messages.js
+++ b/test/mjsunit/messages.js
@@ -192,33 +192,33 @@
}, "this is not a Date object.", TypeError);
// kNotGeneric
-test(() => String.prototype.toString.call(1),
- "String.prototype.toString requires that 'this' be a String",
- TypeError);
-
-test(() => String.prototype.valueOf.call(1),
- "String.prototype.valueOf requires that 'this' be a String",
- TypeError);
-
-test(() => Boolean.prototype.toString.call(1),
- "Boolean.prototype.toString requires that 'this' be a Boolean",
- TypeError);
-
-test(() => Boolean.prototype.valueOf.call(1),
- "Boolean.prototype.valueOf requires that 'this' be a Boolean",
- TypeError);
-
-test(() => Number.prototype.toString.call({}),
- "Number.prototype.toString requires that 'this' be a Number",
- TypeError);
-
-test(() => Number.prototype.valueOf.call({}),
- "Number.prototype.valueOf requires that 'this' be a Number",
- TypeError);
-
-test(() => Function.prototype.toString.call(1),
- "Function.prototype.toString requires that 'this' be a Function",
- TypeError);
+test(function() {
+ String.prototype.toString.call(1);
+}, "String.prototype.toString is not generic", TypeError);
+
+test(function() {
+ String.prototype.valueOf.call(1);
+}, "String.prototype.valueOf is not generic", TypeError);
+
+test(function() {
+ Boolean.prototype.toString.call(1);
+}, "Boolean.prototype.toString is not generic", TypeError);
+
+test(function() {
+ Boolean.prototype.valueOf.call(1);
+}, "Boolean.prototype.valueOf is not generic", TypeError);
+
+test(function() {
+ Number.prototype.toString.call({});
+}, "Number.prototype.toString is not generic", TypeError);
+
+test(function() {
+ Number.prototype.valueOf.call({});
+}, "Number.prototype.valueOf is not generic", TypeError);
+
+test(function() {
+ Function.prototype.toString.call(1);
+}, "Function.prototype.toString is not generic", TypeError);
// kNotTypedArray
test(function() {
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698