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

Side by Side Diff: LayoutTests/inspector/extensions/extensions-audits-tests.js

Issue 1158723004: DevTools: Fix the inspector/extensions/extensions-audits.html. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/extensions/extensions-audits-content-script-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function extension_runAudits(callback) 1 function extension_runAudits(callback)
2 { 2 {
3 evaluateOnFrontend("InspectorTest.startExtensionAudits(reply);", callback); 3 evaluateOnFrontend("InspectorTest.startExtensionAudits(reply);", callback);
4 } 4 }
5 5
6 // runs in front-end 6 // runs in front-end
7 var initialize_ExtensionsAuditsTest = function() 7 var initialize_ExtensionsAuditsTest = function()
8 { 8 {
9 InspectorTest.startExtensionAudits = function(callback) 9 InspectorTest.startExtensionAudits = function(callback)
10 { 10 {
11 const launcherView = WebInspector.panels.audits._launcherView; 11 const launcherView = WebInspector.panels.audits._launcherView;
12 launcherView._selectAllClicked(false); 12 launcherView._selectAllClicked(false);
13 launcherView._auditPresentStateElement.checked = true; 13 launcherView._auditPresentStateElement.checked = true;
14 14
15 var extensionCategories = document.evaluate("label[starts-with(.,'Extens ion ')]/input[@type='checkbox']", 15 var extensionCategories = document.querySelectorAll(".audit-categories-c ontainer > label");
16 WebInspector.panels.audits._launcherView._categoriesElement, null, X PathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); 16 for (var i = 0; i < extensionCategories.length; ++i) {
17 17 var shouldBeEnabled = extensionCategories[i].textContent.includes("E xtension");
18 for (var i = 0; i < extensionCategories.snapshotLength; ++i) 18 if (shouldBeEnabled !== extensionCategories[i].checkboxElement.check ed)
19 extensionCategories.snapshotItem(i).click(); 19 extensionCategories[i].checkboxElement.click();
20 }
20 21
21 function onAuditsDone() 22 function onAuditsDone()
22 { 23 {
23 InspectorTest.collectAuditResults(callback); 24 InspectorTest.collectAuditResults(callback);
24 } 25 }
25 InspectorTest.addSniffer(WebInspector.panels.audits, "auditFinishedCallb ack", onAuditsDone, true); 26 InspectorTest.addSniffer(WebInspector.panels.audits, "auditFinishedCallb ack", onAuditsDone, true);
26 27
27 launcherView._launchButtonClicked(); 28 launcherView._launchButtonClicked();
28 } 29 }
29 30
30 InspectorTest.dumpAuditProgress = function() 31 InspectorTest.dumpAuditProgress = function()
31 { 32 {
32 var progress = document.querySelector(".progress-indicator").shadowRoot. querySelector("progress"); 33 var progress = document.querySelector(".progress-indicator").shadowRoot. querySelector("progress");
33 InspectorTest.addResult("Progress: " + Math.round(100 * progress.value / progress.max) + "%"); 34 InspectorTest.addResult("Progress: " + Math.round(100 * progress.value / progress.max) + "%");
34 } 35 }
35 36
36 // We will render DOM node results, so preload elements. 37 // We will render DOM node results, so preload elements.
37 InspectorTest.preloadPanel("elements"); 38 InspectorTest.preloadPanel("elements");
38 InspectorTest.preloadPanel("audits"); 39 InspectorTest.preloadPanel("audits");
39 } 40 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/extensions/extensions-audits-content-script-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698