| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |