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

Side by Side Diff: chrome/test/data/webui/extensions/extension_detail_view_test.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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Suite of tests for extensions-detail-view. */ 5 /** @fileoverview Suite of tests for extensions-detail-view. */
6 cr.define('extension_detail_view_tests', function() { 6 cr.define('extension_detail_view_tests', function() {
7 /** @enum {string} */ 7 /** @enum {string} */
8 var TestNames = { 8 var TestNames = {
9 Layout: 'layout', 9 Layout: 'layout',
10 ClickableElements: 'clickable elements', 10 ClickableElements: 'clickable elements',
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }); 42 });
43 mockDelegate = new extension_test_util.MockItemDelegate(); 43 mockDelegate = new extension_test_util.MockItemDelegate();
44 item = new extensions.DetailView(); 44 item = new extensions.DetailView();
45 item.set('data', extensionData); 45 item.set('data', extensionData);
46 item.set('delegate', mockDelegate); 46 item.set('delegate', mockDelegate);
47 document.body.appendChild(item); 47 document.body.appendChild(item);
48 }); 48 });
49 49
50 test(assert(TestNames.Layout), function() { 50 test(assert(TestNames.Layout), function() {
51 Polymer.dom.flush(); 51 Polymer.dom.flush();
52
53 extension_test_util.testIronIcons(item);
54
52 var testIsVisible = extension_test_util.isVisible.bind(null, item); 55 var testIsVisible = extension_test_util.isVisible.bind(null, item);
53 expectTrue(testIsVisible('#close-button')); 56 expectTrue(testIsVisible('#close-button'));
54 expectTrue(testIsVisible('#open-in-webstore')); 57 expectTrue(testIsVisible('#open-in-webstore'));
55 expectTrue(testIsVisible('#options')); 58 expectTrue(testIsVisible('#options'));
56 59
57 // Check the checkboxes visibility and state. They should be visible 60 // Check the checkboxes visibility and state. They should be visible
58 // only if the associated option is enabled, and checked if the 61 // only if the associated option is enabled, and checked if the
59 // associated option is active. 62 // associated option is active.
60 var accessOptions = [ 63 var accessOptions = [
61 {key: 'incognitoAccess', id: '#allow-incognito'}, 64 {key: 'incognitoAccess', id: '#allow-incognito'},
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 [extensionData.id, true]); 101 [extensionData.id, true]);
99 }); 102 });
100 }); 103 });
101 } 104 }
102 105
103 return { 106 return {
104 registerTests: registerTests, 107 registerTests: registerTests,
105 TestNames: TestNames, 108 TestNames: TestNames,
106 }; 109 };
107 }); 110 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_extensions/sidebar.html ('k') | chrome/test/data/webui/extensions/extension_sidebar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698