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) |
})(); |