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

Unified Diff: test/mjsunit/value-wrapper.js

Issue 6087011: Draft of ES5 fix to Function.prototype.call and apply (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 12 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 | « test/mjsunit/regress/regress-485.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/value-wrapper.js
diff --git a/test/mjsunit/value-wrapper.js b/test/mjsunit/value-wrapper.js
index 88330b4497033405df72ff6e0759b35a85df89a5..23e20da616ca7758466b125ba3b7119da24d7a07 100644
--- a/test/mjsunit/value-wrapper.js
+++ b/test/mjsunit/value-wrapper.js
@@ -147,18 +147,18 @@ Number.prototype[7] = TypeOfThis;
RunTests();
-// According to ES3 15.3.4.3 the this value passed to Function.prototyle.apply
-// should wrapped. According to ES5 it should not.
-assertEquals('object', TypeOfThis.apply('xxx', []));
-assertEquals('object', TypeOfThis.apply(true, []));
-assertEquals('object', TypeOfThis.apply(false, []));
-assertEquals('object', TypeOfThis.apply(42, []));
-assertEquals('object', TypeOfThis.apply(3.14, []));
-
-// According to ES3 15.3.4.3 the this value passed to Function.prototyle.call
-// should wrapped. According to ES5 it should not.
-assertEquals('object', TypeOfThis.call('xxx'));
-assertEquals('object', TypeOfThis.call(true));
-assertEquals('object', TypeOfThis.call(false));
-assertEquals('object', TypeOfThis.call(42));
-assertEquals('object', TypeOfThis.call(3.14));
+// According to ES5 15.3.4.3 the this value passed to Function.prototyle.apply
+// should not be wrapped. (According to ES3 it should.)
+assertEquals('string', TypeOfThis.apply('xxx', []));
+assertEquals('boolean', TypeOfThis.apply(true, []));
+assertEquals('boolean', TypeOfThis.apply(false, []));
+assertEquals('number', TypeOfThis.apply(42, []));
+assertEquals('number', TypeOfThis.apply(3.14, []));
+
+// According to ES5 15.3.4.4 the this value passed to Function.prototyle.call
+// should not be wrapped. (According to ES3 it should.)
+assertEquals('string', TypeOfThis.call('xxx'));
+assertEquals('boolean', TypeOfThis.call(true));
+assertEquals('boolean', TypeOfThis.call(false));
+assertEquals('number', TypeOfThis.call(42));
+assertEquals('number', TypeOfThis.call(3.14));
« no previous file with comments | « test/mjsunit/regress/regress-485.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698