| 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/options/options_browsertest_base.js']); | |
| 6 | |
| 7 function AccountsOptionsWebUITest() {} | 5 function AccountsOptionsWebUITest() {} |
| 8 | 6 |
| 9 AccountsOptionsWebUITest.prototype = { | 7 AccountsOptionsWebUITest.prototype = { |
| 10 __proto__: OptionsBrowsertestBase.prototype, | 8 __proto__: testing.Test.prototype, |
| 11 | 9 |
| 12 /** | 10 /** |
| 13 * Browse to accounts options. | 11 * Browse to accounts options. |
| 14 */ | 12 */ |
| 15 browsePreload: 'chrome://settings-frame/accounts', | 13 browsePreload: 'chrome://settings-frame/accounts', |
| 16 }; | 14 }; |
| 17 | 15 |
| 18 function createEnterKeyboardEvent(type) { | 16 function createEnterKeyboardEvent(type) { |
| 19 return new KeyboardEvent(type, { | 17 return new KeyboardEvent(type, { |
| 20 'bubbles': true, | 18 'bubbles': true, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 assertTrue(accountsOptionsPage.visible); | 31 assertTrue(accountsOptionsPage.visible); |
| 34 | 32 |
| 35 // Simulate pressing the enter key in the edit field. | 33 // Simulate pressing the enter key in the edit field. |
| 36 inputField.dispatchEvent(createEnterKeyboardEvent('keydown')); | 34 inputField.dispatchEvent(createEnterKeyboardEvent('keydown')); |
| 37 inputField.dispatchEvent(createEnterKeyboardEvent('keypress')); | 35 inputField.dispatchEvent(createEnterKeyboardEvent('keypress')); |
| 38 inputField.dispatchEvent(createEnterKeyboardEvent('keyup')); | 36 inputField.dispatchEvent(createEnterKeyboardEvent('keyup')); |
| 39 | 37 |
| 40 // Verify the overlay is still visible. | 38 // Verify the overlay is still visible. |
| 41 assertTrue(accountsOptionsPage.visible); | 39 assertTrue(accountsOptionsPage.visible); |
| 42 }); | 40 }); |
| OLD | NEW |