OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GEN_INCLUDE(['downloads_ui_browsertest_base.js']); | 5 GEN_INCLUDE(['downloads_ui_browsertest_base.js']); |
6 GEN('#include "chrome/browser/ui/webui/downloads_ui_browsertest.h"'); | 6 GEN('#include "chrome/browser/ui/webui/downloads_ui_browsertest.h"'); |
7 | 7 |
8 // Test UI when removing entries is allowed. | 8 // Test UI when removing entries is allowed. |
9 TEST_F('BaseDownloadsWebUITest', 'DeleteAllowed', function() { | 9 TEST_F('BaseDownloadsWebUITest', 'DeleteAllowed', function() { |
10 this.expectDeleteControlsVisible(true); | 10 this.expectDeleteControlsVisible(true); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 */ | 113 */ |
114 function EmptyDownloadsWebUITest() {} | 114 function EmptyDownloadsWebUITest() {} |
115 | 115 |
116 EmptyDownloadsWebUITest.prototype = { | 116 EmptyDownloadsWebUITest.prototype = { |
117 __proto__: BaseDownloadsWebUITest.prototype, | 117 __proto__: BaseDownloadsWebUITest.prototype, |
118 | 118 |
119 /** @override */ | 119 /** @override */ |
120 setUp: function() { | 120 setUp: function() { |
121 // Doesn't create any fake downloads. | 121 // Doesn't create any fake downloads. |
122 assertEquals(0, downloads.Manager.size()); | 122 assertEquals(0, downloads.Manager.size()); |
| 123 |
| 124 this.updateAccessibilityAuditConfig(); |
123 }, | 125 }, |
124 }; | 126 }; |
125 | 127 |
126 TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() { | 128 TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() { |
127 expectTrue($('downloads-display').hidden); | 129 expectTrue($('downloads-display').hidden); |
128 var noResults = $('no-downloads-or-results'); | 130 var noResults = $('no-downloads-or-results'); |
129 this.checkShowing(noResults, loadTimeData.getString('noDownloads')); | 131 this.checkShowing(noResults, loadTimeData.getString('noDownloads')); |
130 }); | 132 }); |
131 | 133 |
132 TEST_F('EmptyDownloadsWebUITest', 'NoSearchResultsWithNoDownloads', function() { | 134 TEST_F('EmptyDownloadsWebUITest', 'NoSearchResultsWithNoDownloads', function() { |
(...skipping 26 matching lines...) Expand all Loading... |
159 this.expectDeleteControlsVisible(false); | 161 this.expectDeleteControlsVisible(false); |
160 // TODO(pamg): Mock out the back-end calls, so we can also test removing a | 162 // TODO(pamg): Mock out the back-end calls, so we can also test removing a |
161 // single item. | 163 // single item. |
162 }); | 164 }); |
163 | 165 |
164 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'ClearLeavesSearch', function() { | 166 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'ClearLeavesSearch', function() { |
165 downloads.Manager.setSearchText('muhahaha'); | 167 downloads.Manager.setSearchText('muhahaha'); |
166 $('clear-all').click(); | 168 $('clear-all').click(); |
167 expectGE(downloads.Manager.getInstance().searchText_.length, 0); | 169 expectGE(downloads.Manager.getInstance().searchText_.length, 0); |
168 }); | 170 }); |
OLD | NEW |