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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.js

Issue 2968523003: [DevTools] Migrate inspector-protocol/debugger tests to new harness (Closed)
Patch Set: all tests Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.js
new file mode 100644
index 0000000000000000000000000000000000000000..8e5db35c70b529d9e0c875038050f597c2ac9e66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/scriptParsedHash.js
@@ -0,0 +1,24 @@
+(async function(testRunner) {
+ let {page, session, dp} = await testRunner.startBlank('');
+
+ var hashes = new Set(['1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18',
+ 'EBF1ECD351E7A3294CB5762843D429DC872EBA18',
+ '22D0043331237371241FC675A984B967025A3DC0']);
+
+ dp.Debugger.enable();
+ dp.Debugger.onScriptParsed(messageObject => {
+ if (hashes.has(messageObject.params.hash))
+ testRunner.log('Hash received: ' + messageObject.params.hash);
+ });
+
+ function longScript() {
+ var longScript = "var b = 1;";
+ for (var i = 0; i < 2024; ++i)
+ longScript += "++b;";
+ }
+
+ dp.Runtime.evaluate({expression: '1'});
+ dp.Runtime.evaluate({expression: '239'});
+ await dp.Runtime.evaluate({expression: '(' + longScript + ')()' });
+ testRunner.completeTest();
+})

Powered by Google App Engine
This is Rietveld 408576698