| 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 "chrome/browser/ui/webui/downloads_ui_browsertest.h"'); | 5 GEN('#include "chrome/browser/ui/webui/downloads_ui_browsertest.h"'); |
| 6 | 6 |
| 7 /** @const */ var TOTAL_RESULT_COUNT = 25; | 7 /** @const */ var TOTAL_RESULT_COUNT = 25; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Test C++ fixture for downloads WebUI testing. | 10 * Test C++ fixture for downloads WebUI testing. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 // Test UI when removing entries is prohibited. | 156 // Test UI when removing entries is prohibited. |
| 157 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'DeleteProhibited', function() { | 157 TEST_F('DownloadsWebUIDeleteProhibitedTest', 'DeleteProhibited', function() { |
| 158 this.testHelper(false, false); | 158 this.testHelper(false, false); |
| 159 // TODO(pamg): Mock out the back-end calls, so we can also test removing a | 159 // TODO(pamg): Mock out the back-end calls, so we can also test removing a |
| 160 // single item. | 160 // single item. |
| 161 testDone(); | 161 testDone(); |
| 162 }); | 162 }); |
| 163 | 163 |
| 164 GEN('#if defined(ENABLE_MANAGED_USERS)'); |
| 164 /** | 165 /** |
| 165 * Fixture for Downloads WebUI testing for a supervised user. | 166 * Fixture for Downloads WebUI testing for a supervised user. |
| 166 * @extends {BaseDownloadsWebUITest} | 167 * @extends {BaseDownloadsWebUITest} |
| 167 * @constructor | 168 * @constructor |
| 168 */ | 169 */ |
| 169 function DownloadsWebUIForSupervisedUsersTest() {} | 170 function DownloadsWebUIForSupervisedUsersTest() {} |
| 170 | 171 |
| 171 DownloadsWebUIForSupervisedUsersTest.prototype = { | 172 DownloadsWebUIForSupervisedUsersTest.prototype = { |
| 172 __proto__: BaseDownloadsWebUITest.prototype, | 173 __proto__: BaseDownloadsWebUITest.prototype, |
| 173 | 174 |
| 174 /** @override */ | 175 /** @override */ |
| 175 typedefCppFixture: 'DownloadsWebUIForSupervisedUsersTest', | 176 typedefCppFixture: 'DownloadsWebUIForSupervisedUsersTest', |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 // Test UI for supervised users, removing entries should be disabled | 179 // Test UI for supervised users, removing entries should be disabled |
| 179 // and removal controls should be hidden. | 180 // and removal controls should be hidden. |
| 180 TEST_F('DownloadsWebUIForSupervisedUsersTest', 'SupervisedUsers', function() { | 181 TEST_F('DownloadsWebUIForSupervisedUsersTest', 'SupervisedUsers', function() { |
| 181 this.testHelper(false, true); | 182 this.testHelper(false, true); |
| 182 testDone(); | 183 testDone(); |
| 183 }); | 184 }); |
| 185 GEN('#endif'); |
| OLD | NEW |