| 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 createPromise() | 7 function createPromise() |
| 8 { | 8 { |
| 9 var result = {}; | 9 var result = {}; |
| 10 var p = new Promise(function(resolve, reject) { | 10 var p = new Promise(function(resolve, reject) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 if (count--) | 47 if (count--) |
| 48 InspectorTest.waitUntilPausedAndDumpStackAndResume(inner); | 48 InspectorTest.waitUntilPausedAndDumpStackAndResume(inner); |
| 49 else | 49 else |
| 50 callback(); | 50 callback(); |
| 51 } | 51 } |
| 52 inner(); | 52 inner(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 function step1() | 55 function step1() |
| 56 { | 56 { |
| 57 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.PauseOnUncaughtExceptions); | 57 InspectorTest.DebuggerAgent.setPauseOnExceptions(SDK.DebuggerModel.Pause
OnExceptionsState.PauseOnUncaughtExceptions); |
| 58 InspectorTest.showScriptSource("debugger-pause-on-promise-rejection.html
", step2); | 58 InspectorTest.showScriptSource("debugger-pause-on-promise-rejection.html
", step2); |
| 59 } | 59 } |
| 60 | 60 |
| 61 function step2() | 61 function step2() |
| 62 { | 62 { |
| 63 InspectorTest.addResult("=== Pausing only on uncaught exceptions ==="); | 63 InspectorTest.addResult("=== Pausing only on uncaught exceptions ==="); |
| 64 InspectorTest.runTestFunction(); | 64 InspectorTest.runTestFunction(); |
| 65 waitUntilPausedNTimes(1, step3); | 65 waitUntilPausedNTimes(1, step3); |
| 66 } | 66 } |
| 67 | 67 |
| 68 function step3() | 68 function step3() |
| 69 { | 69 { |
| 70 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.PauseOnAllExceptions); | 70 InspectorTest.DebuggerAgent.setPauseOnExceptions(SDK.DebuggerModel.Pause
OnExceptionsState.PauseOnAllExceptions); |
| 71 InspectorTest.addResult("\n=== Pausing on all exceptions ==="); | 71 InspectorTest.addResult("\n=== Pausing on all exceptions ==="); |
| 72 InspectorTest.runTestFunction(); | 72 InspectorTest.runTestFunction(); |
| 73 waitUntilPausedNTimes(2, step4); | 73 waitUntilPausedNTimes(2, step4); |
| 74 } | 74 } |
| 75 | 75 |
| 76 function step4() | 76 function step4() |
| 77 { | 77 { |
| 78 InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerMo
del.PauseOnExceptionsState.DontPauseOnExceptions); | 78 InspectorTest.DebuggerAgent.setPauseOnExceptions(SDK.DebuggerModel.Pause
OnExceptionsState.DontPauseOnExceptions); |
| 79 InspectorTest.completeDebuggerTest(); | 79 InspectorTest.completeDebuggerTest(); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 </script> | 83 </script> |
| 84 </head> | 84 </head> |
| 85 | 85 |
| 86 <body onload="runTest()"> | 86 <body onload="runTest()"> |
| 87 <p> | 87 <p> |
| 88 Tests that pause on promise rejection works. | 88 Tests that pause on promise rejection works. |
| 89 </p> | 89 </p> |
| 90 | 90 |
| 91 </body> | 91 </body> |
| 92 </html> | 92 </html> |
| OLD | NEW |