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

Unified Diff: chrome/test/data/webui/extensions/extension_test_util.js

Issue 1951323002: [MD Extensions]: Fix sidebar icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « chrome/test/data/webui/extensions/extension_sidebar_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/extensions/extension_test_util.js
diff --git a/chrome/test/data/webui/extensions/extension_test_util.js b/chrome/test/data/webui/extensions/extension_test_util.js
index 0ac52c7c0e2cad8abe8ded554b5d2005805659ec..e524ca7b2973f5cb0c4ee8215d8ba3ab58c18f7f 100644
--- a/chrome/test/data/webui/extensions/extension_test_util.js
+++ b/chrome/test/data/webui/extensions/extension_test_util.js
@@ -124,11 +124,25 @@ cr.define('extension_test_util', function() {
}, opt_properties);
}
+ /**
+ * Tests that any iron-icon child of an HTML element has a corresponding
+ * non-empty svg element.
+ * @param {HTMLElement} e The element to check the iron icons in.
+ */
+ function testIronIcons(e) {
+ e.querySelectorAll('* /deep/ iron-icon').forEach(function(icon) {
+ var svg = icon.$$('svg');
+ expectTrue(!!svg && svg.innerHTML != '',
+ 'icon "' + icon.icon + '" is not present');
+ });
+ }
+
return {
ClickMock: ClickMock,
MockItemDelegate: MockItemDelegate,
isVisible: isVisible,
testVisible: testVisible,
createExtensionInfo: createExtensionInfo,
+ testIronIcons: testIronIcons,
};
});
« no previous file with comments | « chrome/test/data/webui/extensions/extension_sidebar_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698