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

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

Issue 1940793002: LayoutTests: adapt inspector debug step test to V8's interpreter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-step/debugger-step-through-promises-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script> 5 <script>
6 6
7 function testFunction() 7 function testFunction()
8 { 8 {
9 Promise.resolve(42).then( 9 Promise.resolve(42).then(
10 function p1() 10 function p1()
11 { 11 {
12 debugger; 12 debugger;
13 } 13 }
14 ).then( 14 ).then(
15 function p2() 15 function p2()
16 { 16 {
17 var dummy = window.foo || 1; 17 return window.foo || 1;
18 return dummy;
19 } 18 }
20 ).then( 19 ).then(
21 function p3() 20 function p3()
22 { 21 {
23 var dummy = window.foo || 2; 22 return window.foo || 2;
24 return dummy;
25 } 23 }
26 ).catch(function(e) { 24 ).catch(function(e) {
27 console.error("FAIL: Unexpected exception: " + e); 25 console.error("FAIL: Unexpected exception: " + e);
28 }); 26 });
29 } 27 }
30 28
31 function test() 29 function test()
32 { 30 {
33 InspectorTest.startDebuggerTest(step1, true); 31 InspectorTest.startDebuggerTest(step1, true);
34 32
35 function step1() 33 function step1()
36 { 34 {
37 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); 35 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
38 } 36 }
39 37
40 function step2() 38 function step2()
41 { 39 {
42 var actions = [ 40 var actions = [
43 "Print", // debugger; at p1 41 "Print", // debugger; at p1
44 "StepInto", "Print", 42 "StepInto", "Print",
45 "StepInto", "Print", // entered p2 43 "StepInto", "Print", // entered p2
46 "StepOver", "Print", 44 "StepOver", "Print",
47 "StepOver", "Print",
48 "StepOver", "Print", // entered p3 45 "StepOver", "Print", // entered p3
49 "StepOver", "Print", 46 "StepOver", "Print",
50 ]; 47 ];
51 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); 48 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3);
52 } 49 }
53 50
54 function step3() 51 function step3()
55 { 52 {
56 InspectorTest.completeDebuggerTest(); 53 InspectorTest.completeDebuggerTest();
57 } 54 }
58 } 55 }
59 56
60 </script> 57 </script>
61 </head> 58 </head>
62 59
63 <body onload="runTest()"> 60 <body onload="runTest()">
64 <input type='button' onclick='testFunction()' value='Test'/> 61 <input type='button' onclick='testFunction()' value='Test'/>
65 <p> 62 <p>
66 Tests that debugger will step through Promise handlers while not stepping into V 8 internal scripts. 63 Tests that debugger will step through Promise handlers while not stepping into V 8 internal scripts.
67 </p> 64 </p>
68 </body> 65 </body>
69 </html> 66 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-step/debugger-step-through-promises-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698