Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_browsertest.js

Issue 253543002: web_dev_style: check webui browser tests as well. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * TestFixture for kiosk app settings WebUI testing. 6 * TestFixture for kiosk app settings WebUI testing.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 * @constructor 8 * @constructor
9 */ 9 */
10 function KioskAppSettingsWebUITest() {} 10 function KioskAppSettingsWebUITest() {}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 }); 83 });
84 84
85 // Verify that enter key on 'kiosk-app-id-edit' adds an app. 85 // Verify that enter key on 'kiosk-app-id-edit' adds an app.
86 TEST_F('KioskAppSettingsWebUITest', 'testAddKioskApp', function() { 86 TEST_F('KioskAppSettingsWebUITest', 'testAddKioskApp', function() {
87 var testAppId = 'app_3'; 87 var testAppId = 'app_3';
88 var appIdInput = $('kiosk-app-id-edit'); 88 var appIdInput = $('kiosk-app-id-edit');
89 89
90 appIdInput.value = testAppId; 90 appIdInput.value = testAppId;
91 91
92 this.mockHandler.expects(once()).addKioskApp([testAppId]); 92 this.mockHandler.expects(once()).addKioskApp([testAppId]);
93 var keypress = document.createEvent("KeyboardEvents"); 93 var keypress = document.createEvent('KeyboardEvents');
94 keypress.initKeyboardEvent('keypress', true, true, null, 'Enter', ''); 94 keypress.initKeyboardEvent('keypress', true, true, null, 'Enter', '');
95 appIdInput.dispatchEvent(keypress); 95 appIdInput.dispatchEvent(keypress);
96 }); 96 });
97 97
98 // Verify that the 'kiosk-app-add' button adds an app. 98 // Verify that the 'kiosk-app-add' button adds an app.
99 TEST_F('KioskAppSettingsWebUITest', 'testAddKioskAppByAddButton', function() { 99 TEST_F('KioskAppSettingsWebUITest', 'testAddKioskAppByAddButton', function() {
100 var testAppId = 'app_3'; 100 var testAppId = 'app_3';
101 $('kiosk-app-id-edit').value = testAppId; 101 $('kiosk-app-id-edit').value = testAppId;
102 102
103 this.mockHandler.expects(once()).addKioskApp([testAppId]); 103 this.mockHandler.expects(once()).addKioskApp([testAppId]);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 var checkbox = $('kiosk-disable-bailout-shortcut'); 227 var checkbox = $('kiosk-disable-bailout-shortcut');
228 228
229 this.settings_.hasAutoLaunchApp = false; 229 this.settings_.hasAutoLaunchApp = false;
230 extensions.KioskAppsOverlay.setSettings(this.settings_); 230 extensions.KioskAppsOverlay.setSettings(this.settings_);
231 expectTrue(checkbox.disabled); 231 expectTrue(checkbox.disabled);
232 232
233 this.settings_.hasAutoLaunchApp = true; 233 this.settings_.hasAutoLaunchApp = true;
234 extensions.KioskAppsOverlay.setSettings(this.settings_); 234 extensions.KioskAppsOverlay.setSettings(this.settings_);
235 expectFalse(checkbox.disabled); 235 expectFalse(checkbox.disabled);
236 }); 236 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698