| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 InspectorTest.log('Checks Debugger.pause'); | 5 InspectorTest.log('Checks Debugger.pause'); |
| 6 | 6 |
| 7 InspectorTest.setupScriptMap(); | 7 InspectorTest.setupScriptMap(); |
| 8 Protocol.Debugger.enable(); | 8 Protocol.Debugger.enable(); |
| 9 InspectorTest.runAsyncTestSuite([ | 9 InspectorTest.runAsyncTestSuite([ |
| 10 async function testPause() { | 10 async function testPause() { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 }, | 36 }, |
| 37 | 37 |
| 38 async function testSkipOtherContext2() { | 38 async function testSkipOtherContext2() { |
| 39 let contextGroupId = utils.createContextGroup(); | 39 let contextGroupId = utils.createContextGroup(); |
| 40 Protocol.Debugger.enable({}, contextGroupId); | 40 Protocol.Debugger.enable({}, contextGroupId); |
| 41 Protocol.Debugger.pause({}, contextGroupId); | 41 Protocol.Debugger.pause({}, contextGroupId); |
| 42 Protocol.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.
js'}); | 42 Protocol.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.
js'}); |
| 43 Protocol.Runtime.evaluate({expression: 'var a = 239;'}, contextGroupId); | 43 Protocol.Runtime.evaluate({expression: 'var a = 239;'}, contextGroupId); |
| 44 Protocol.Runtime.evaluate({expression: 'var a = 1;'}); | 44 Protocol.Runtime.evaluate({expression: 'var a = 1;'}); |
| 45 await waitPauseAndDumpLocation(); | 45 await waitPauseAndDumpLocation(); |
| 46 await Protocol.Debugger.resume(); | 46 // should not resume pause from different context group id. |
| 47 Protocol.Debugger.resume(); |
| 48 Protocol.Debugger.stepOver({}, contextGroupId); |
| 49 await waitPauseAndDumpLocation(); |
| 50 await Protocol.Debugger.resume({}, contextGroupId); |
| 47 await Protocol.Debugger.disable({}, contextGroupId); | 51 await Protocol.Debugger.disable({}, contextGroupId); |
| 48 }, | 52 }, |
| 49 | 53 |
| 50 async function testWithNativeBreakpoint() { | 54 async function testWithNativeBreakpoint() { |
| 51 utils.schedulePauseOnNextStatement('', ''); | 55 utils.schedulePauseOnNextStatement('', ''); |
| 52 await Protocol.Debugger.pause(); | 56 await Protocol.Debugger.pause(); |
| 53 utils.cancelPauseOnNextStatement(); | 57 utils.cancelPauseOnNextStatement(); |
| 54 Protocol.Runtime.evaluate({expression: 'var a = 42;'}); | 58 Protocol.Runtime.evaluate({expression: 'var a = 42;'}); |
| 55 await waitPauseAndDumpLocation(); | 59 await waitPauseAndDumpLocation(); |
| 56 await Protocol.Debugger.resume(); | 60 await Protocol.Debugger.resume(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 80 await Protocol.Debugger.resume(); | 84 await Protocol.Debugger.resume(); |
| 81 } | 85 } |
| 82 ]); | 86 ]); |
| 83 | 87 |
| 84 async function waitPauseAndDumpLocation() { | 88 async function waitPauseAndDumpLocation() { |
| 85 var message = await Protocol.Debugger.oncePaused(); | 89 var message = await Protocol.Debugger.oncePaused(); |
| 86 InspectorTest.log('paused at:'); | 90 InspectorTest.log('paused at:'); |
| 87 await InspectorTest.logSourceLocation(message.params.callFrames[0].location); | 91 await InspectorTest.logSourceLocation(message.params.callFrames[0].location); |
| 88 return message; | 92 return message; |
| 89 } | 93 } |
| OLD | NEW |