| 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(); | |
| 125 }, | 123 }, |
| 126 }; | 124 }; |
| 127 | 125 |
| 128 TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() { | 126 TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() { |
| 129 expectTrue($('downloads-display').hidden); | 127 expectTrue($('downloads-display').hidden); |
| 130 var noResults = $('no-downloads-or-results'); | 128 var noResults = $('no-downloads-or-results'); |
| 131 this.checkShowing(noResults, loadTimeData.getString('noDownloads')); | 129 this.checkShowing(noResults, loadTimeData.getString('noDownloads')); |
| 132 }); | 130 }); |
| 133 | 131 |
| 134 TEST_F('EmptyDownloadsWebUITest', 'NoSearchResultsWithNoDownloads', function() { | 132 TEST_F('EmptyDownloadsWebUITest', 'NoSearchResultsWithNoDownloads', function() { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 161 this.expectDeleteControlsVisible(false); | 159 this.expectDeleteControlsVisible(false); |
| 162 // TODO(pamg): Mock out the back-end calls, so we can also test removing a | 160 // TODO(pamg): Mock out the back-end calls, so we can also test removing a |
| 163 // single item. | 161 // single item. |
| 164 }); | 162 }); |
| 165 | 163 |
| 166 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'ClearLeavesSearch', function() { | 164 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'ClearLeavesSearch', function() { |
| 167 downloads.Manager.setSearchText('muhahaha'); | 165 downloads.Manager.setSearchText('muhahaha'); |
| 168 $('clear-all').click(); | 166 $('clear-all').click(); |
| 169 expectGE(downloads.Manager.getInstance().searchText_.length, 0); | 167 expectGE(downloads.Manager.getInstance().searchText_.length, 0); |
| 170 }); | 168 }); |
| OLD | NEW |