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

Unified Diff: test/mjsunit/harmony/promise-species.js

Issue 2096933002: Remove all harmony runtime flags which shipped in M51 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 6 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/harmony/iterator-close.js ('k') | test/mjsunit/harmony/regexp-change-exec.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/promise-species.js
diff --git a/test/mjsunit/harmony/promise-species.js b/test/mjsunit/harmony/promise-species.js
deleted file mode 100644
index 12244f291a14b58bc6f44714ce5787bfa03bb6f7..0000000000000000000000000000000000000000
--- a/test/mjsunit/harmony/promise-species.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --harmony-species --allow-natives-syntax
-
-// Test that Promises use @@species appropriately
-
-// Another constructor with no species will not be instantiated
-var test = new Promise(function(){});
-var bogoCount = 0;
-function bogusConstructor() { bogoCount++; }
-test.constructor = bogusConstructor;
-assertTrue(Promise.resolve(test) instanceof Promise);
-assertFalse(Promise.resolve(test) instanceof bogusConstructor);
-// Tests that chromium:575314 is fixed thoroughly
-Promise.resolve(test).catch(e => %AbortJS("Error " + e)).then(() => {
- if (bogoCount != 0) %AbortJS("bogoCount was " + bogoCount + " should be 0");
-});
-
-// If there is a species, it will be instantiated
-// @@species will be read exactly once, and the constructor is called with a
-// function
-var count = 0;
-var params;
-class MyPromise extends Promise {
- constructor(...args) {
- super(...args);
- params = args;
- }
- static get [Symbol.species]() {
- count++
- return this;
- }
-}
-
-var myPromise = MyPromise.resolve().then();
-assertEquals(1, count);
-assertEquals(1, params.length);
-assertEquals('function', typeof(params[0]));
-assertTrue(myPromise instanceof MyPromise);
-assertTrue(myPromise instanceof Promise);
« no previous file with comments | « test/mjsunit/harmony/iterator-close.js ('k') | test/mjsunit/harmony/regexp-change-exec.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698