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

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

Issue 1370583002: Don’t smash globals used by the test helper itself. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/promises.js
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js
index 19239b601bc74e10c22565cdcfc8f16687759fdf..405da02b53999493215658c07cc2025ff586ac5c 100644
--- a/test/mjsunit/es6/promises.js
+++ b/test/mjsunit/es6/promises.js
@@ -62,7 +62,15 @@ function clearProp(o, name) {
// Find intrinsics and null them out.
var globals = Object.getOwnPropertyNames(this)
-var whitelist = {Promise: true, TypeError: true}
+var whitelist = {
+ Promise: true,
+ TypeError: true,
+ String: true,
+ JSON: true,
+ Error: true,
+ MjsUnitAssertionError: true
+};
+
for (var i in globals) {
var name = globals[i]
if (name in whitelist || name[0] === name[0].toLowerCase()) delete globals[i]
@@ -97,7 +105,6 @@ function assertAsyncDone(iteration) {
});
}
-
(function() {
assertThrows(function() { Promise(function() {}) }, TypeError)
})();
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698