OLD | NEW |
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 var promise1 = new Promise( | 9 var promise1 = new Promise( |
10 function promiseConstructor1(resolve, reject) | 10 function promiseConstructor1(resolve, reject) |
(...skipping 27 matching lines...) Expand all Loading... |
38 function test() | 38 function test() |
39 { | 39 { |
40 var events = []; | 40 var events = []; |
41 var minPromiseId; | 41 var minPromiseId; |
42 | 42 |
43 InspectorTest.startDebuggerTest(step1, true); | 43 InspectorTest.startDebuggerTest(step1, true); |
44 | 44 |
45 function step1() | 45 function step1() |
46 { | 46 { |
47 InspectorTest.DebuggerAgent.enablePromiseTracker(true); | 47 InspectorTest.DebuggerAgent.enablePromiseTracker(true); |
48 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.E
vents.PromiseUpdated, promiseUpdated); | 48 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.
Events.PromiseUpdated, promiseUpdated); |
49 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); | 49 InspectorTest.runTestFunctionAndWaitUntilPaused(step2); |
50 } | 50 } |
51 | 51 |
52 function promiseUpdated(event) | 52 function promiseUpdated(event) |
53 { | 53 { |
54 var promiseId = event.data.promise.id; | 54 var promiseId = event.data.promise.id; |
55 minPromiseId = Math.min(minPromiseId, promiseId) || promiseId; | 55 minPromiseId = Math.min(minPromiseId, promiseId) || promiseId; |
56 events.push(event.data); | 56 events.push(event.data); |
57 } | 57 } |
58 | 58 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 </script> | 104 </script> |
105 </head> | 105 </head> |
106 | 106 |
107 <body onload="runTest()"> | 107 <body onload="runTest()"> |
108 <p> | 108 <p> |
109 Tests promise tracker events in debugger. | 109 Tests promise tracker events in debugger. |
110 </p> | 110 </p> |
111 </body> | 111 </body> |
112 </html> | 112 </html> |
OLD | NEW |