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

Side by Side Diff: test/inspector/debugger/script-parsed-hash.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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 // 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 let {session, contextGroup, Protocol} = InspectorTest.start('Tests scripts hasin g');
6
5 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18", 7 var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18",
6 "EBF1ECD351E7A3294CB5762843D429DC872EBA18", 8 "EBF1ECD351E7A3294CB5762843D429DC872EBA18",
7 "86A31E7131896CF01BA837945C2894385F369F24"]); 9 "86A31E7131896CF01BA837945C2894385F369F24"]);
8 Protocol.Debugger.enable(); 10 Protocol.Debugger.enable();
9 Protocol.Debugger.onScriptParsed(function(messageObject) 11 Protocol.Debugger.onScriptParsed(function(messageObject)
10 { 12 {
11 if (hashes.has(messageObject.params.hash)) 13 if (hashes.has(messageObject.params.hash))
12 InspectorTest.log(`Hash received: ${messageObject.params.hash}`); 14 InspectorTest.log(`Hash received: ${messageObject.params.hash}`);
13 else 15 else
14 InspectorTest.log(`[FAIL]: unknown hash ${messageObject.params.hash}`); 16 InspectorTest.log(`[FAIL]: unknown hash ${messageObject.params.hash}`);
15 }); 17 });
16 18
17 function longScript() { 19 function longScript() {
18 var longScript = "var b = 1;"; 20 var longScript = "var b = 1;";
19 for (var i = 0; i < 2024; ++i) 21 for (var i = 0; i < 2024; ++i)
20 longScript += "++b;"; 22 longScript += "++b;";
21 } 23 }
22 24
23 Protocol.Runtime.enable(); 25 Protocol.Runtime.enable();
24 Protocol.Runtime.compileScript({ expression: "1", sourceURL: "foo1.js", persistS cript: true }); 26 Protocol.Runtime.compileScript({ expression: "1", sourceURL: "foo1.js", persistS cript: true });
25 Protocol.Runtime.compileScript({ expression: "239", sourceURL: "foo2.js", persis tScript: true }); 27 Protocol.Runtime.compileScript({ expression: "239", sourceURL: "foo2.js", persis tScript: true });
26 Protocol.Runtime.compileScript({ expression: "(" + longScript + ")()", sourceURL : "foo3.js", persistScript: true }).then(step2); 28 Protocol.Runtime.compileScript({ expression: "(" + longScript + ")()", sourceURL : "foo3.js", persistScript: true }).then(step2);
27 29
28 function step2() 30 function step2()
29 { 31 {
30 InspectorTest.completeTest(); 32 InspectorTest.completeTest();
31 } 33 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/script-parsed-for-runtime-evaluate.js ('k') | test/inspector/debugger/script-parsed-hash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698