OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18", |
| 6 "EBF1ECD351E7A3294CB5762843D429DC872EBA18", |
| 7 "86A31E7131896CF01BA837945C2894385F369F24"]); |
| 8 InspectorTest.sendCommandOrDie("Debugger.enable", {}, function() { |
| 9 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject) |
| 10 { |
| 11 if (hashes.has(messageObject.params.hash)) |
| 12 InspectorTest.log(`Hash received: ${messageObject.params.hash}`); |
| 13 else |
| 14 InspectorTest.log(`[FAIL]: unknown hash ${messageObject.params.hash}`); |
| 15 } |
| 16 }); |
| 17 |
| 18 function longScript() { |
| 19 var longScript = "var b = 1;"; |
| 20 for (var i = 0; i < 2024; ++i) |
| 21 longScript += "++b;"; |
| 22 } |
| 23 |
| 24 InspectorTest.sendCommandOrDie("Runtime.enable"); |
| 25 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "1", sourc
eURL: "foo1.js", persistScript: true }); |
| 26 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "239", sou
rceURL: "foo2.js", persistScript: true }); |
| 27 InspectorTest.sendCommandOrDie("Runtime.compileScript", { expression: "(" + long
Script + ")()", sourceURL: "foo3.js", persistScript: true }, step2); |
| 28 |
| 29 function step2() |
| 30 { |
| 31 InspectorTest.completeTest(); |
| 32 } |
OLD | NEW |