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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/inspector/extensions/extensions-audits-content-script-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/extensions/extensions-audits-tests.js
diff --git a/LayoutTests/inspector/extensions/extensions-audits-tests.js b/LayoutTests/inspector/extensions/extensions-audits-tests.js
index 8772974611e80d052f83e085b1be9b6f6073ac96..f05e10d9aeab4d0b1c00e3a3a5a7050475199d65 100644
--- a/LayoutTests/inspector/extensions/extensions-audits-tests.js
+++ b/LayoutTests/inspector/extensions/extensions-audits-tests.js
@@ -12,11 +12,12 @@ var initialize_ExtensionsAuditsTest = function()
launcherView._selectAllClicked(false);
launcherView._auditPresentStateElement.checked = true;
- var extensionCategories = document.evaluate("label[starts-with(.,'Extension ')]/input[@type='checkbox']",
- WebInspector.panels.audits._launcherView._categoriesElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-
- for (var i = 0; i < extensionCategories.snapshotLength; ++i)
- extensionCategories.snapshotItem(i).click();
+ var extensionCategories = document.querySelectorAll(".audit-categories-container > label");
+ for (var i = 0; i < extensionCategories.length; ++i) {
+ var shouldBeEnabled = extensionCategories[i].textContent.includes("Extension");
+ if (shouldBeEnabled !== extensionCategories[i].checkboxElement.checked)
+ extensionCategories[i].checkboxElement.click();
+ }
function onAuditsDone()
{
« 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