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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview Common utilities for extension ui tests. */ 5 /** @fileoverview Common utilities for extension ui tests. */
6 cr.define('extension_test_util', function() { 6 cr.define('extension_test_util', function() {
7 /** 7 /**
8 * A mock to test that clicking on an element calls a specific method. 8 * A mock to test that clicking on an element calls a specific method.
9 * @constructor 9 * @constructor
10 */ 10 */
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 incognitoAccess: {isEnabled: true, isActive: false}, 117 incognitoAccess: {isEnabled: true, isActive: false},
118 location: 'FROM_STORE', 118 location: 'FROM_STORE',
119 name: 'Wonderful Extension', 119 name: 'Wonderful Extension',
120 state: 'ENABLED', 120 state: 'ENABLED',
121 type: 'EXTENSION', 121 type: 'EXTENSION',
122 version: '2.0', 122 version: '2.0',
123 views: [{url: baseUrl + 'foo.html'}, {url: baseUrl + 'bar.html'}], 123 views: [{url: baseUrl + 'foo.html'}, {url: baseUrl + 'bar.html'}],
124 }, opt_properties); 124 }, opt_properties);
125 } 125 }
126 126
127 /**
128 * 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.
129 * non-empty svg element.
130 * @param {HTMLElement} e The element to check the iron icons in.
131 */
132 function testIronIcons(e) {
133 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
134 var svg = icon.$$('svg');
135 expectTrue(!!svg && svg.innerHTML != '',
136 'icon "' + icon.icon + '" is not present');
137 });
138 }
139
127 return { 140 return {
128 ClickMock: ClickMock, 141 ClickMock: ClickMock,
129 MockItemDelegate: MockItemDelegate, 142 MockItemDelegate: MockItemDelegate,
130 isVisible: isVisible, 143 isVisible: isVisible,
131 testVisible: testVisible, 144 testVisible: testVisible,
132 createExtensionInfo: createExtensionInfo, 145 createExtensionInfo: createExtensionInfo,
146 testIronIcons: testIronIcons,
133 }; 147 };
134 }); 148 });
OLDNEW
« 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