OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options/options_browsertest.h"'); | 5 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); |
6 | 6 |
7 /** | 7 /** |
8 * Wait for the global window.onpopstate callback to be called (after a tab | 8 * Wait for the global window.onpopstate callback to be called (after a tab |
9 * history navigation), then execute |afterFunction|. | 9 * history navigation), then execute |afterFunction|. |
10 */ | 10 */ |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 'bubbles': true, | 254 'bubbles': true, |
255 'cancelable': true, | 255 'cancelable': true, |
256 'keyIdentifier': 'Enter' | 256 'keyIdentifier': 'Enter' |
257 }); | 257 }); |
258 assertFalse(event.defaultPrevented); | 258 assertFalse(event.defaultPrevented); |
259 page.pageDiv.dispatchEvent(event); | 259 page.pageDiv.dispatchEvent(event); |
260 assertTrue(event.defaultPrevented); | 260 assertTrue(event.defaultPrevented); |
261 testDone(); | 261 testDone(); |
262 }); | 262 }); |
263 | 263 |
| 264 // Verifies that sending an empty list of indexes to move doesn't crash chrome. |
| 265 TEST_F('OptionsWebUITest', 'emptySelectedIndexesDoesntCrash', function() { |
| 266 chrome.send('dragDropStartupPage', [0, []]); |
| 267 setTimeout(testDone); |
| 268 }); |
| 269 |
264 /** | 270 /** |
265 * TestFixture for OptionsPage WebUI testing including tab history. | 271 * TestFixture for OptionsPage WebUI testing including tab history. |
266 * @extends {testing.Test} | 272 * @extends {testing.Test} |
267 * @constructor | 273 * @constructor |
268 */ | 274 */ |
269 function OptionsWebUINavigationTest() {} | 275 function OptionsWebUINavigationTest() {} |
270 | 276 |
271 OptionsWebUINavigationTest.prototype = { | 277 OptionsWebUINavigationTest.prototype = { |
272 __proto__: testing.Test.prototype, | 278 __proto__: testing.Test.prototype, |
273 | 279 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 OptionsPage.navigateToPage('searchEngines'); | 704 OptionsPage.navigateToPage('searchEngines'); |
699 expectNotEquals(loc, location.href); | 705 expectNotEquals(loc, location.href); |
700 | 706 |
701 document.documentElement.classList.remove('loading'); | 707 document.documentElement.classList.remove('loading'); |
702 assertFalse(OptionsPage.isLoading()); | 708 assertFalse(OptionsPage.isLoading()); |
703 OptionsPage.showDefaultPage(); | 709 OptionsPage.showDefaultPage(); |
704 expectEquals(loc, location.href); | 710 expectEquals(loc, location.href); |
705 | 711 |
706 testDone(); | 712 testDone(); |
707 }); | 713 }); |
OLD | NEW |