1 function extension_runAudits(callback
)
3 evaluateOnFrontend("InspectorTest.startExtensionAudits(reply);", callback
);
7 var initialize_ExtensionsAuditsTest = function()
9 InspectorTest
.startExtensionAudits = function(callback
)
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();
22 function onAuditsDone()
24 InspectorTest
.collectAuditResults(callback
);
26 InspectorTest
.addSniffer(WebInspector
.panels
.audits
, "auditFinishedCallback", onAuditsDone
, true);
28 launcherView
._launchButtonClicked();
31 InspectorTest
.dumpAuditProgress = function()
33 var progress
= document
.querySelector(".progress-indicator").shadowRoot
.querySelector("progress");
34 InspectorTest
.addResult("Progress: " + Math
.round(100 * progress
.value
/ progress
.max
) + "%");
37 // We will render DOM node results, so preload elements.
38 InspectorTest
.preloadPanel("elements");
39 InspectorTest
.preloadPanel("audits");