Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / extensions / extensions-audits-tests.js
blobf05e10d9aeab4d0b1c00e3a3a5a7050475199d65
1 function extension_runAudits(callback)
3     evaluateOnFrontend("InspectorTest.startExtensionAudits(reply);", callback);
6 // runs in front-end
7 var initialize_ExtensionsAuditsTest = function()
9     InspectorTest.startExtensionAudits = function(callback)
10     {
11         const launcherView = WebInspector.panels.audits._launcherView;
12         launcherView._selectAllClicked(false);
13         launcherView._auditPresentStateElement.checked = true;
15         var extensionCategories = document.querySelectorAll(".audit-categories-container > label");
16         for (var i = 0; i < extensionCategories.length; ++i) {
17             var shouldBeEnabled = extensionCategories[i].textContent.includes("Extension");
18             if (shouldBeEnabled !== extensionCategories[i].checkboxElement.checked)
19                 extensionCategories[i].checkboxElement.click();
20         }
22         function onAuditsDone()
23         {
24             InspectorTest.collectAuditResults(callback);
25         }
26         InspectorTest.addSniffer(WebInspector.panels.audits, "auditFinishedCallback", onAuditsDone, true);
28         launcherView._launchButtonClicked();
29     }
31     InspectorTest.dumpAuditProgress = function()
32     {
33         var progress = document.querySelector(".progress-indicator").shadowRoot.querySelector("progress");
34         InspectorTest.addResult("Progress: " + Math.round(100 * progress.value / progress.max) + "%");
35     }
37     // We will render DOM node results, so preload elements.
38     InspectorTest.preloadPanel("elements");
39     InspectorTest.preloadPanel("audits");