diff --git a/chrome/browser/resources/md_extensions/detail_view.html b/chrome/browser/resources/md_extensions/detail_view.html
index ce38afe8da7eb..95bd59b94aed2 100644
--- a/chrome/browser/resources/md_extensions/detail_view.html
+++ b/chrome/browser/resources/md_extensions/detail_view.html
@@ -1,6 +1,7 @@
+
diff --git a/chrome/browser/resources/md_extensions/sidebar.html b/chrome/browser/resources/md_extensions/sidebar.html
index 2a78a9b99341d..efb7efbfc44d1 100644
--- a/chrome/browser/resources/md_extensions/sidebar.html
+++ b/chrome/browser/resources/md_extensions/sidebar.html
@@ -1,6 +1,7 @@
+
diff --git a/chrome/test/data/webui/extensions/extension_detail_view_test.js b/chrome/test/data/webui/extensions/extension_detail_view_test.js
index b87fda6f76f61..3ad31473e7f25 100644
--- a/chrome/test/data/webui/extensions/extension_detail_view_test.js
+++ b/chrome/test/data/webui/extensions/extension_detail_view_test.js
@@ -49,6 +49,9 @@ cr.define('extension_detail_view_tests', function() {
test(assert(TestNames.Layout), function() {
Polymer.dom.flush();
+
+ extension_test_util.testIronIcons(item);
+
var testIsVisible = extension_test_util.isVisible.bind(null, item);
expectTrue(testIsVisible('#close-button'));
expectTrue(testIsVisible('#open-in-webstore'));
diff --git a/chrome/test/data/webui/extensions/extension_sidebar_test.js b/chrome/test/data/webui/extensions/extension_sidebar_test.js
index cfe5c8a8a8023..25068bb58310b 100644
--- a/chrome/test/data/webui/extensions/extension_sidebar_test.js
+++ b/chrome/test/data/webui/extensions/extension_sidebar_test.js
@@ -59,6 +59,8 @@ cr.define('extension_sidebar_tests', function() {
});
test(assert(TestNames.Layout), function() {
+ extension_test_util.testIronIcons(sidebar);
+
var testVisible = extension_test_util.testVisible.bind(null, sidebar);
testVisible('#load-unpacked', false);
testVisible('#pack-extensions', false);
diff --git a/chrome/test/data/webui/extensions/extension_test_util.js b/chrome/test/data/webui/extensions/extension_test_util.js
index 0ac52c7c0e2ca..e524ca7b2973f 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,
};
});