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/browser.h"'); | |
6 GEN('#include "chrome/browser/ui/browser_commands.h"'); | |
7 GEN('#include "chrome/browser/ui/exclusive_access/' + | |
8 'fullscreen_controller_test.h"'); | |
9 | |
10 /** | 5 /** |
11 * Fixture for ChromeOs WebUI OOBE testing. | 6 * Fixture for ChromeOs WebUI OOBE testing. |
12 * | 7 * |
13 * There's one test for each page in the Chrome OS Out-of-box-experience | 8 * There's one test for each page in the Chrome OS Out-of-box-experience |
14 * (OOBE), so that an accessibility audit can be run automatically on | 9 * (OOBE), so that an accessibility audit can be run automatically on |
15 * each one. This will alert a developer immediately if they accidentally | 10 * each one. This will alert a developer immediately if they accidentally |
16 * forget to label a control, or if a focusable control ends up | 11 * forget to label a control, or if a focusable control ends up |
17 * off-screen without being disabled, for example. | 12 * off-screen without being disabled, for example. |
18 * @constructor | 13 * @constructor |
19 */ | 14 */ |
20 function OobeWebUITest() {} | 15 function OobeWebUITest() {} |
21 | 16 |
22 OobeWebUITest.prototype = { | 17 OobeWebUITest.prototype = { |
23 __proto__: testing.Test.prototype, | 18 __proto__: testing.Test.prototype, |
24 | 19 |
25 /** @override */ | 20 /** @override */ |
26 browsePreload: 'chrome://oobe/oobe', | 21 browsePreload: 'chrome://oobe/oobe', |
27 | 22 |
28 /** @override */ | 23 /** @override */ |
29 runAccessibilityChecks: true, | 24 runAccessibilityChecks: true, |
30 | 25 |
31 /** @override */ | 26 /** @override */ |
32 accessibilityIssuesAreErrors: true, | 27 accessibilityIssuesAreErrors: true, |
33 | 28 |
34 /** @override */ | 29 /** @override */ |
35 testGenPreamble: function() { | |
36 // OobeWebUI should run in fullscreen. | |
37 GEN(' FullscreenNotificationObserver fullscreen_observer;'); | |
38 GEN(' chrome::ToggleFullscreenMode(browser());'); | |
39 GEN(' fullscreen_observer.Wait();'); | |
40 }, | |
41 | |
42 /** @override */ | |
43 setUp: function() { | 30 setUp: function() { |
44 testing.Test.prototype.setUp.call(this); | 31 testing.Test.prototype.setUp.call(this); |
45 | 32 |
46 // Polymer issue https://github.com/Polymer/polymer/issues/1081 | 33 // Polymer issue https://github.com/Polymer/polymer/issues/1081 |
47 this.accessibilityAuditConfig.ignoreSelectors('badAriaAttributeValue', | 34 this.accessibilityAuditConfig.ignoreSelectors('badAriaAttributeValue', |
48 'PAPER-BUTTON'); | 35 'PAPER-BUTTON'); |
49 this.accessibilityAuditConfig.ignoreSelectors('badAriaAttributeValue', | 36 this.accessibilityAuditConfig.ignoreSelectors('badAriaAttributeValue', |
50 '#progressContainer'); | 37 '#progressContainer'); |
51 }, | 38 }, |
52 }; | 39 }; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // other way to initialize the appropriate C++ handlers. | 99 // other way to initialize the appropriate C++ handlers. |
113 TEST_F('OobeWebUITest', 'DISABLED_OobeUserImage', function() { | 100 TEST_F('OobeWebUITest', 'DISABLED_OobeUserImage', function() { |
114 Oobe.getInstance().showScreen({'id':'user-image'}); | 101 Oobe.getInstance().showScreen({'id':'user-image'}); |
115 }); | 102 }); |
116 | 103 |
117 // TODO: figure out what state to mock in order for this | 104 // TODO: figure out what state to mock in order for this |
118 // screen to show up. | 105 // screen to show up. |
119 TEST_F('OobeWebUITest', 'DISABLED_OobeAccountPicker', function() { | 106 TEST_F('OobeWebUITest', 'DISABLED_OobeAccountPicker', function() { |
120 Oobe.getInstance().showScreen({'id':'account-picker'}); | 107 Oobe.getInstance().showScreen({'id':'account-picker'}); |
121 }); | 108 }); |
OLD | NEW |