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

Unified Diff: test/mjsunit/harmony/set-prototype-of.js

Issue 1051523003: [es6] Object.getPrototypeOf should work with values (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « test/mjsunit/get-prototype-of.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/set-prototype-of.js
diff --git a/test/mjsunit/harmony/set-prototype-of.js b/test/mjsunit/harmony/set-prototype-of.js
index 810220d1a8f217a773c3c31da10bea9ca3ef4d8e..e06215a0edfcca65a84b4524f017c9805e856d22 100644
--- a/test/mjsunit/harmony/set-prototype-of.js
+++ b/test/mjsunit/harmony/set-prototype-of.js
@@ -64,15 +64,9 @@ var valuesWithoutNull = coercibleValues.concat(undefined);
function TestSetPrototypeOfCoercibleValues() {
for (var i = 0; i < coercibleValues.length; i++) {
var value = coercibleValues[i];
- assertThrows(function() {
- Object.getPrototypeOf(value);
- }, TypeError);
-
+ var proto = Object.getPrototypeOf(value);
assertEquals(Object.setPrototypeOf(value, {}), value);
-
- assertThrows(function() {
- Object.getPrototypeOf(value);
- }, TypeError);
+ assertSame(proto, Object.getPrototypeOf(value));
}
}
TestSetPrototypeOfCoercibleValues();
« no previous file with comments | « test/mjsunit/get-prototype-of.js ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698