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

Side by Side Diff: test/debugger/debug/es6/debug-promises/stepin-constructor.js

Issue 2476303003: Revert of [debugger] Migrate more debugger tests to inspector (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 var Debug = debug.Debug;
7 var exception = null;
8 var breaks = [];
9
10 function listener(event, exec_state, event_data, data) {
11 if (event != Debug.DebugEvent.Break) return;
12 try {
13 breaks.push(exec_state.frame(0).sourceLineText().trimLeft());
14 exec_state.prepareStep(Debug.StepAction.StepIn);
15 } catch (e) {
16 exception = e;
17 }
18 }
19
20 Debug.setListener(listener);
21
22 function resolver(resolve, reject) {
23 print(1);
24 print(2);
25 print(3);
26 resolve();
27 }
28
29 debugger;
30 var p = new Promise(resolver);
31
32 Debug.setListener(null);
33
34 var expected_breaks = [
35 "debugger;",
36 "var p = new Promise(resolver);",
37 "print(1);",
38 "print(2);",
39 "print(3);",
40 "resolve();",
41 "}",
42 "Debug.setListener(null);"
43 ];
44
45 assertEquals(expected_breaks, breaks);
46 assertNull(exception);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698