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

Side by Side Diff: LayoutTests/inspector/sources/debugger/debugger-step-through-promises.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6
7 function testFunction()
8 {
9 Promise.resolve(42).then(
10 function p1()
11 {
12 debugger;
13 }
14 ).then(
15 function p2()
16 {
17 var dummy = window.foo || 1;
18 return dummy;
19 }
20 ).then(
21 function p3()
22 {
23 var dummy = window.foo || 2;
24 return dummy;
25 }
26 ).catch(function(e) {
27 console.error("FAIL: Unexpected exception: " + e);
28 });
29 }
30
31 function test()
32 {
33 InspectorTest.startDebuggerTest(step1, true);
34
35 function step1()
36 {
37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
38 }
39
40 function step2()
41 {
42 var actions = [
43 "Print", // debugger; at p1
44 "StepInto", "Print",
45 "StepInto", "Print", // entered p2
46 "StepOver", "Print",
47 "StepOver", "Print",
48 "StepOver", "Print", // entered p3
49 "StepOver", "Print",
50 ];
51 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3);
52 }
53
54 function step3()
55 {
56 InspectorTest.completeDebuggerTest();
57 }
58 }
59
60 </script>
61 </head>
62
63 <body onload="runTest()">
64 <input type='button' onclick='testFunction()' value='Test'/>
65 <p>
66 Tests that debugger will step through Promise handlers while not stepping into V 8 internal scripts.
67 </p>
68 </body>
69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698