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

Unified Diff: test/mjsunit/es6/microtask-delivery.js

Issue 1909433003: Remove support for Object.observe (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 8 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/es6/debug-stepin-microtasks.js ('k') | test/mjsunit/es6/regress/regress-3750.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/microtask-delivery.js
diff --git a/test/mjsunit/es6/microtask-delivery.js b/test/mjsunit/es6/microtask-delivery.js
index 01b971ddc0cb9c7ef3da42a0437ae4e937519948..6b239bea4706fa8e8a6841113455ae8aa123875b 100644
--- a/test/mjsunit/es6/microtask-delivery.js
+++ b/test/mjsunit/es6/microtask-delivery.js
@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-object-observe
// Flags: --allow-natives-syntax
var ordering = [];
@@ -71,22 +70,6 @@ function newPromise(id, fn) {
};
}
-function newObserver(id, fn, obj) {
- var observer = {
- value: 1,
- recordCounts: []
- };
-
- Object.observe(observer, function(records) {
- ordering.push('o' + id);
- observer.recordCounts.push(records.length);
- if (fn) fn();
- });
-
- return observer;
-}
-
-
(function PromiseThens() {
reset();
@@ -98,72 +81,3 @@ function newObserver(id, fn, obj) {
assertOrdering(['p1', 'p2', 'p1:1', 'p2:1']);
})();
-
-
-(function ObserversBatch() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var p3 = newPromise(3);
-
- var ob1 = newObserver(1);
- var ob2 = newObserver(2, function() {
- ob3.value++;
- p3.resolve();
- ob1.value++;
- });
- var ob3 = newObserver(3);
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2', 'o1', 'o3', 'p3']);
- assertArrayValues([1, 1], ob1.recordCounts);
- assertArrayValues([1], ob2.recordCounts);
- assertArrayValues([1], ob3.recordCounts);
-})();
-
-
-(function ObserversGetAllRecords() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var ob1 = newObserver(1, function() {
- ob2.value++;
- });
- var ob2 = newObserver(2);
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2']);
- assertArrayValues([1], ob1.recordCounts);
- assertArrayValues([2], ob2.recordCounts);
-})();
-
-
-(function NewObserverDeliveryGetsNewMicrotask() {
- reset();
-
- var p1 = newPromise(1);
- var p2 = newPromise(2);
- var ob1 = newObserver(1);
- var ob2 = newObserver(2, function() {
- ob1.value++;
- });
-
- p1.resolve();
- ob1.value++;
- p2.resolve();
- ob2.value++;
-
- assertOrdering(['p1', 'o1', 'o2', 'p2', 'o1']);
- assertArrayValues([1, 1], ob1.recordCounts);
- assertArrayValues([1], ob2.recordCounts);
-})();
« no previous file with comments | « test/mjsunit/es6/debug-stepin-microtasks.js ('k') | test/mjsunit/es6/regress/regress-3750.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698