Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / ui / webui / options / chromeos / accounts_options_browsertest.js
blobafa6907f0f5c4d135e3669897229622e26f2d994
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
3 // found in the LICENSE file.
5 function AccountsOptionsWebUITest() {}
7 AccountsOptionsWebUITest.prototype = {
8 __proto__: testing.Test.prototype,
10 /**
11 * Browse to accounts options.
13 browsePreload: 'chrome://settings-frame/accounts',
16 function createEnterKeyboardEvent(type) {
17 return new KeyboardEvent(type, {
18 'bubbles': true,
19 'cancelable': true,
20 'keyIdentifier': 'Enter'
21 });
24 TEST_F('AccountsOptionsWebUITest', 'testNoCloseOnEnter', function() {
25 assertEquals(this.browsePreload, document.location.href);
27 var inputField = $('userNameEdit');
28 var accountsOptionsPage = AccountsOptions.getInstance();
30 // Overlay is visible.
31 assertTrue(accountsOptionsPage.visible);
33 // Simulate pressing the enter key in the edit field.
34 inputField.dispatchEvent(createEnterKeyboardEvent('keydown'));
35 inputField.dispatchEvent(createEnterKeyboardEvent('keypress'));
36 inputField.dispatchEvent(createEnterKeyboardEvent('keyup'));
38 // Verify the overlay is still visible.
39 assertTrue(accountsOptionsPage.visible);
40 });