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

Unified Diff: test/mjsunit/es6/debug-promises-async-task-event.js

Issue 440773004: Trigger exception debug events on Promise reject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments Created 6 years, 4 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-promise-events.js ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-promises-async-task-event.js
diff --git a/test/mjsunit/es6/debug-promises-async-task-event.js b/test/mjsunit/es6/debug-promises-async-task-event.js
deleted file mode 100644
index 88030a2e73c93d6d02fe26052c7a783df4bf49c9..0000000000000000000000000000000000000000
--- a/test/mjsunit/es6/debug-promises-async-task-event.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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: --expose-debug-as debug
-
-Debug = debug.Debug;
-
-var base_id = -1;
-var exception = null;
-var expected = [
- "enqueue #1",
- "willHandle #1",
- "then #1",
- "enqueue #2",
- "didHandle #1",
- "willHandle #2",
- "then #2",
- "enqueue #3",
- "didHandle #2",
- "willHandle #3",
- "didHandle #3"
-];
-
-function assertLog(msg) {
- print(msg);
- assertTrue(expected.length > 0);
- assertEquals(expected.shift(), msg);
- if (!expected.length) {
- Debug.setListener(null);
- }
-}
-
-function listener(event, exec_state, event_data, data) {
- if (event != Debug.DebugEvent.AsyncTaskEvent) return;
- try {
- if (base_id < 0)
- base_id = event_data.id();
- var id = event_data.id() - base_id + 1;
- assertEquals("Promise.resolve", event_data.name());
- assertLog(event_data.type() + " #" + id);
- } catch (e) {
- print(e + e.stack)
- exception = e;
- }
-}
-
-Debug.setListener(listener);
-
-var resolver;
-var p = new Promise(function(resolve, reject) {
- resolver = resolve;
-});
-p.then(function() {
- assertLog("then #1");
-}).then(function() {
- assertLog("then #2");
-});
-resolver();
-
-assertNull(exception);
« no previous file with comments | « test/mjsunit/es6/debug-promise-events.js ('k') | test/mjsunit/es6/debug-promises-caught-all.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698