| OLD | NEW |
| 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 Suite of tests for extension-sidebar. */ | 5 /** @fileoverview Suite of tests for extension-sidebar. */ |
| 6 cr.define('extension_sidebar_tests', function() { | 6 cr.define('extension_sidebar_tests', function() { |
| 7 /** | 7 /** |
| 8 * A mock delegate for the sidebar. | 8 * A mock delegate for the sidebar. |
| 9 * @constructor | 9 * @constructor |
| 10 * @implements {extensions.SidebarDelegate} | 10 * @implements {extensions.SidebarDelegate} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 }); | 52 }); |
| 53 | 53 |
| 54 setup(function() { | 54 setup(function() { |
| 55 sidebar = document.querySelector('extensions-manager').sidebar; | 55 sidebar = document.querySelector('extensions-manager').sidebar; |
| 56 mockDelegate = new MockDelegate(); | 56 mockDelegate = new MockDelegate(); |
| 57 sidebar.setDelegate(mockDelegate); | 57 sidebar.setDelegate(mockDelegate); |
| 58 sidebar.setListDelegate(mockDelegate); | 58 sidebar.setListDelegate(mockDelegate); |
| 59 }); | 59 }); |
| 60 | 60 |
| 61 test(assert(TestNames.Layout), function() { | 61 test(assert(TestNames.Layout), function() { |
| 62 extension_test_util.testIronIcons(sidebar); |
| 63 |
| 62 var testVisible = extension_test_util.testVisible.bind(null, sidebar); | 64 var testVisible = extension_test_util.testVisible.bind(null, sidebar); |
| 63 testVisible('#load-unpacked', false); | 65 testVisible('#load-unpacked', false); |
| 64 testVisible('#pack-extensions', false); | 66 testVisible('#pack-extensions', false); |
| 65 testVisible('#update-now', false); | 67 testVisible('#update-now', false); |
| 66 | 68 |
| 67 sidebar.set('inDevMode', true); | 69 sidebar.set('inDevMode', true); |
| 68 Polymer.dom.flush(); | 70 Polymer.dom.flush(); |
| 69 | 71 |
| 70 testVisible('#load-unpacked', true); | 72 testVisible('#load-unpacked', true); |
| 71 testVisible('#pack-extensions', true); | 73 testVisible('#pack-extensions', true); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 96 [extensions.ShowingType.APPS]); | 98 [extensions.ShowingType.APPS]); |
| 97 }); | 99 }); |
| 98 }); | 100 }); |
| 99 } | 101 } |
| 100 | 102 |
| 101 return { | 103 return { |
| 102 registerTests: registerTests, | 104 registerTests: registerTests, |
| 103 TestNames: TestNames, | 105 TestNames: TestNames, |
| 104 }; | 106 }; |
| 105 }); | 107 }); |
| OLD | NEW |