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