| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 print("Checks that inspector reports script compiled in Runtime.evaluate," + | 5 InspectorTest.log("Checks that inspector reports script compiled in Runtime.eval
uate," + |
| 6 "Runtime.callFunctionOn and Runtime.compileScript"); | 6 "Runtime.callFunctionOn and Runtime.compileScript"); |
| 7 | 7 |
| 8 Promise.prototype.thenLog = function log(message) { | 8 Promise.prototype.thenLog = function log(message) { |
| 9 return this.then(() => InspectorTest.log(message)); | 9 return this.then(() => InspectorTest.log(message)); |
| 10 } | 10 } |
| 11 | 11 |
| 12 var objectId; | 12 var objectId; |
| 13 Protocol.Runtime.enable(); | 13 Protocol.Runtime.enable(); |
| 14 Protocol.Debugger.enable() | 14 Protocol.Debugger.enable() |
| 15 .then(() => Protocol.Debugger.onScriptParsed(InspectorTest.logMessage)) | 15 .then(() => Protocol.Debugger.onScriptParsed(InspectorTest.logMessage)) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 40 .then(() => Protocol.Runtime.compileScript({ expression: "}", | 40 .then(() => Protocol.Runtime.compileScript({ expression: "}", |
| 41 sourceURL: "compile-script-syntax-error.js", persistScript: true })) | 41 sourceURL: "compile-script-syntax-error.js", persistScript: true })) |
| 42 | 42 |
| 43 .thenLog('Runtime.compileScript persistScript: false (should be no script even
ts)') | 43 .thenLog('Runtime.compileScript persistScript: false (should be no script even
ts)') |
| 44 .then(() => Protocol.Runtime.compileScript({ expression: "({})", | 44 .then(() => Protocol.Runtime.compileScript({ expression: "({})", |
| 45 sourceURL: "compile-script-syntax-error.js", persistScript: false })) | 45 sourceURL: "compile-script-syntax-error.js", persistScript: false })) |
| 46 .then(() => Protocol.Runtime.compileScript({ expression: "}", | 46 .then(() => Protocol.Runtime.compileScript({ expression: "}", |
| 47 sourceURL: "compile-script-syntax-error.js", persistScript: false })) | 47 sourceURL: "compile-script-syntax-error.js", persistScript: false })) |
| 48 | 48 |
| 49 .then(InspectorTest.completeTest); | 49 .then(InspectorTest.completeTest); |
| OLD | NEW |