| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 function test() | 5 function test() |
| 6 { | 6 { |
| 7 var hashes = [ "3FB75160AB1F4E4E82675BC4CD924D3481ABE278", "3DCE1FBEAB1F4E4E
82675BC4CD924D3481ABE278", "3938780E1AC4B414D9464CC4C2CE4144D52D9AF" ]; | 7 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18", |
| 8 "EBF1ECD351E7A3294CB5762843D429DC872EBA18", |
| 9 "22D0043331237371241FC675A984B967025A3DC0"]); |
| 10 InspectorTest.sendCommandOrDie("Debugger.enable", {}, function() { |
| 11 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageOb
ject) |
| 12 { |
| 13 if (hashes.has(messageObject.params.hash)) |
| 14 InspectorTest.log("Hash received: " + messageObject.params.hash)
; |
| 15 } |
| 16 }); |
| 8 | 17 |
| 9 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject
) | 18 function longScript() { |
| 10 { | 19 var longScript = "var b = 1;"; |
| 11 if (messageObject.params.hash === hashes[0]) | 20 for (var i = 0; i < 2024; ++i) |
| 12 InspectorTest.log("Hash received: " + hashes.shift()); | 21 longScript += "++b;"; |
| 13 } | 22 } |
| 14 InspectorTest.sendCommandOrDie("Debugger.enable"); | |
| 15 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "eval(\"\")
" }, step1); | |
| 16 | 23 |
| 17 function step1() | 24 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "1" }); |
| 18 { | 25 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "239" }); |
| 19 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "eval(\
"239;\")" }, step2); | 26 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "(" + longS
cript + ")()" }, step2); |
| 20 } | |
| 21 | 27 |
| 22 function step2() | 28 function step2() |
| 23 { | 29 { |
| 24 var longScript = "var b = 1;"; | |
| 25 for (var i = 0; i < 1024; ++i) | |
| 26 longScript += "++b;"; | |
| 27 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "eval(\
"" + longScript + "\")" }, step3); | |
| 28 } | |
| 29 | |
| 30 function step3() | |
| 31 { | |
| 32 if (hashes.length) | |
| 33 InspectorTest.log("Not received: " + JSON.stringify(hashes)); | |
| 34 InspectorTest.completeTest(); | 30 InspectorTest.completeTest(); |
| 35 } | 31 } |
| 36 } | 32 } |
| 37 </script> | 33 </script> |
| 38 </head> | 34 </head> |
| 39 <body onLoad="runTest();"> | 35 <body onLoad="runTest();"> |
| 40 </body> | 36 </body> |
| 41 </html> | 37 </html> |
| OLD | NEW |