Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.html

Issue 1758313002: DevTools: introduce collections shim to be backed by non-wtf in v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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", "EBF1ECD35 1E7A3294CB5762843D429DC872EBA18", "22D0043331237371241FC675A984B967025A3DC"]);
8 InspectorTest.sendCommandOrDie("Debugger.enable", {}, function() {
9 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageOb ject)
10 {
11 if (hashes.has(messageObject.params.hash))
12 InspectorTest.log("Hash received: " + messageObject.params.hash) ;
13 }
14 });
8 15
9 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject ) 16 function longScript() {
10 { 17 var longScript = "var b = 1;";
11 if (messageObject.params.hash === hashes[0]) 18 for (var i = 0; i < 2024; ++i)
12 InspectorTest.log("Hash received: " + hashes.shift()); 19 longScript += "++b;";
13 } 20 }
14 InspectorTest.sendCommandOrDie("Debugger.enable");
15 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "eval(\"\") " }, step1);
16 21
17 function step1() 22 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "1" });
18 { 23 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "239" });
19 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "eval(\ "239;\")" }, step2); 24 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "(" + longS cript + ")()" }, step2);
20 }
21 25
22 function step2() 26 function step2()
23 { 27 {
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(); 28 InspectorTest.completeTest();
35 } 29 }
36 } 30 }
37 </script> 31 </script>
38 </head> 32 </head>
39 <body onLoad="runTest();"> 33 <body onLoad="runTest();">
40 </body> 34 </body>
41 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698