Chromium Code Reviews| 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/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function testFunction() | 8 function testFunction() |
| 9 { | 9 { |
| 10 console.clear(); | 10 console.clear(); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 m0.catch(function() { | 27 m0.catch(function() { |
| 28 m2.catch(function() { | 28 m2.catch(function() { |
| 29 m1.catch(function() { | 29 m1.catch(function() { |
| 30 m4 = m3.then(function() {}); // Unhandled. | 30 m4 = m3.then(function() {}); // Unhandled. |
| 31 }); | 31 }); |
| 32 }); | 32 }); |
| 33 }); | 33 }); |
| 34 reject(new Error(source + ".err2")); | 34 reject(new Error(source + ".err2")); |
| 35 } | 35 } |
| 36 | 36 |
| 37 function runPromisesFromInspector() | |
| 38 { | |
| 39 // setTimeout to cut off VM call frames from the stack trace. | |
| 40 setTimeout(function timeout() { | |
|
yurys
2014/10/16 07:43:44
style: { should go on the next line.
aandrey
2014/10/16 09:01:38
Acknowledged.
| |
| 41 runPromises("inspector") | |
| 42 }, 0); | |
| 43 } | |
| 44 | |
| 37 function test() | 45 function test() |
| 38 { | 46 { |
| 39 InspectorTest.setQuiet(true); | 47 InspectorTest.setQuiet(true); |
| 40 InspectorTest.startDebuggerTest(step1); | 48 InspectorTest.startDebuggerTest(step1); |
| 41 | 49 |
| 42 function step1() | 50 function step1() |
| 43 { | 51 { |
| 44 InspectorTest.addConsoleViewSniffer(addMessage, true); | 52 InspectorTest.addConsoleViewSniffer(addMessage, true); |
| 45 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); | 53 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); |
| 46 } | 54 } |
| 47 | 55 |
| 48 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | 56 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) |
| 49 { | 57 { |
| 50 InspectorTest.evaluateInPage("runPromises('inspector')", resumeExecution ); | 58 InspectorTest.evaluateInPage("runPromisesFromInspector()", resumeExecuti on); |
| 51 } | 59 } |
| 52 | 60 |
| 53 function resumeExecution() | 61 function resumeExecution() |
| 54 { | 62 { |
| 55 InspectorTest.resumeExecution(); | 63 InspectorTest.resumeExecution(); |
| 56 } | 64 } |
| 57 | 65 |
| 58 var count = 0; | 66 var count = 0; |
| 59 function addMessage(uiMessage) | 67 function addMessage(uiMessage) |
| 60 { | 68 { |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 74 </script> | 82 </script> |
| 75 </head> | 83 </head> |
| 76 | 84 |
| 77 <body onload="runTest()"> | 85 <body onload="runTest()"> |
| 78 <p> | 86 <p> |
| 79 Tests uncaught promise rejections fired during pause. | 87 Tests uncaught promise rejections fired during pause. |
| 80 </p> | 88 </p> |
| 81 | 89 |
| 82 </body> | 90 </body> |
| 83 </html> | 91 </html> |
| OLD | NEW |