Index: test/mjsunit/es6/debug-promises/stepin-constructor.js |
diff --git a/test/mjsunit/regress/regress-crbug-119800.js b/test/mjsunit/es6/debug-promises/stepin-constructor.js |
similarity index 62% |
copy from test/mjsunit/regress/regress-crbug-119800.js |
copy to test/mjsunit/es6/debug-promises/stepin-constructor.js |
index 1641cac686ef8c56699ff5140b805f6e9b1abf07..4f3891b1878b01e60693295503dd0e472d5b51f3 100644 |
--- a/test/mjsunit/regress/regress-crbug-119800.js |
+++ b/test/mjsunit/es6/debug-promises/stepin-constructor.js |
@@ -4,12 +4,6 @@ |
// Flags: --expose-debug-as debug |
-function f() { |
- 1; |
- 2; |
- 3; |
-} |
- |
var Debug = debug.Debug; |
var exception = null; |
var breaks = []; |
@@ -17,8 +11,7 @@ var breaks = []; |
function listener(event, exec_state, event_data, data) { |
if (event != Debug.DebugEvent.Break) return; |
try { |
- Debug.debuggerFlags().breakPointsActive.setValue(false); |
- breaks.push(exec_state.frame().sourceLineText().trimLeft()); |
+ breaks.push(exec_state.frame(0).sourceLineText().trimLeft()); |
exec_state.prepareStep(Debug.StepAction.StepIn, 1); |
} catch (e) { |
exception = e; |
@@ -26,12 +19,29 @@ function listener(event, exec_state, event_data, data) { |
} |
Debug.setListener(listener); |
-Debug.setBreakPoint(f, 0, 0); |
-f(); |
+function resolver(resolve, reject) { |
+ 1; |
+ 2; |
+ 3; |
+ resolve(); |
+} |
+ |
+debugger; |
+var p = new Promise(resolver); |
Debug.setListener(null); |
-Debug.debuggerFlags().breakPointsActive.setValue(true); |
+var expected_breaks = [ |
+ "debugger;", |
+ "var p = new Promise(resolver);", |
+ "1;", |
+ "2;", |
+ "3;", |
+ "resolve();", |
+ "}", |
+ "Debug.setListener(null);" |
+]; |
+ |
+assertEquals(expected_breaks, breaks); |
assertNull(exception); |
-assertEquals(breaks, ["1;", "2;", "3;", "}", "Debug.setListener(null);"]); |