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

Unified Diff: test/mjsunit/es6/promises.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add @@toStringTag to some objects + tests Created 6 years, 2 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
Index: test/mjsunit/es6/promises.js
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js
index faf154ee0a5f7c421bfd8e126f972ab2e31d37a7..56da81588007a4c3723fc77fda5fcdc7f4157e91 100644
--- a/test/mjsunit/es6/promises.js
+++ b/test/mjsunit/es6/promises.js
@@ -33,6 +33,7 @@ var observe = Object.observe;
var getOwnPropertyNames = Object.getOwnPropertyNames
var defineProperty = Object.defineProperty
+
function clear(o) {
if (o === null || (typeof o !== 'object' && typeof o !== 'function')) return
clear(o.__proto__)
@@ -58,6 +59,15 @@ for (var i in globals) {
var name = globals[i]
if (name in whitelist || name[0] === name[0].toLowerCase()) delete globals[i]
}
+
+
+(function() {
rossberg 2014/10/17 11:19:30 Move this to line 36.
+ // Test before clearing global (fails otherwise)
+ assertEquals("[object Promise]",
+ Object.prototype.toString.call(new Promise(function() {})));
+})();
+
+
for (var i in globals) {
if (globals[i]) clearProp(this, globals[i])
}
@@ -92,7 +102,6 @@ function assertAsyncDone(iteration) {
dummy.dummy = dummy
}
-
(function() {
assertThrows(function() { Promise(function() {}) }, TypeError)
})();

Powered by Google App Engine
This is Rietveld 408576698