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