Chromium Code Reviews| 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..bf9abc7c84250de1feaa73d8f42e0c25513ff7ed 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-element child of an HTML element has a corresponding |
|
michaelpg
2016/05/05 17:06:27
iron-icon
Devlin
2016/05/05 20:28:32
whoops, done.
|
| + * 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) { |
|
michaelpg
2016/05/05 17:06:27
out of curiosity, what happens when e == document.
Devlin
2016/05/05 20:28:32
Discussed offline, will experiment in a followup c
|
| + 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, |
| }; |
| }); |