OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // Network status control functions. | 65 // Network status control functions. |
66 void SimulateNetworkOffline(); | 66 void SimulateNetworkOffline(); |
67 void SimulateNetworkOnline(); | 67 void SimulateNetworkOnline(); |
68 void SimulateNetworkPortal(); | 68 void SimulateNetworkPortal(); |
69 | 69 |
70 base::Closure SimulateNetworkOfflineClosure(); | 70 base::Closure SimulateNetworkOfflineClosure(); |
71 base::Closure SimulateNetworkOnlineClosure(); | 71 base::Closure SimulateNetworkOnlineClosure(); |
72 base::Closure SimulateNetworkPortalClosure(); | 72 base::Closure SimulateNetworkPortalClosure(); |
73 | 73 |
| 74 void DisableRestrictiveProxyCheck(); |
| 75 |
74 // Checks JavaScript |expression| in login screen. | 76 // Checks JavaScript |expression| in login screen. |
75 void JsExpect(const std::string& expression); | 77 void JsExpect(const std::string& expression); |
76 | 78 |
77 test::JSChecker& JS() { return js_checker_; } | 79 test::JSChecker& JS() { return js_checker_; } |
78 | 80 |
79 bool initialize_fake_merge_session() { | 81 bool initialize_fake_merge_session() { |
80 return initialize_fake_merge_session_; | 82 return initialize_fake_merge_session_; |
81 } | 83 } |
82 void set_initialize_fake_merge_session(bool value) { | 84 void set_initialize_fake_merge_session(bool value) { |
83 initialize_fake_merge_session_ = value; | 85 initialize_fake_merge_session_ = value; |
84 } | 86 } |
85 | 87 |
86 // Returns chrome://oobe WebUI. | 88 // Returns chrome://oobe WebUI. |
87 content::WebUI* GetLoginUI(); | 89 content::WebUI* GetLoginUI(); |
88 | 90 |
89 // Returns login display. | 91 // Returns login display. |
90 WebUILoginDisplay* GetLoginDisplay(); | 92 WebUILoginDisplay* GetLoginDisplay(); |
91 | 93 |
92 void WaitForGaiaPageLoad(); | 94 void WaitForGaiaPageLoad(); |
| 95 void WaitForGaiaPageReload(); |
93 void WaitForSigninScreen(); | 96 void WaitForSigninScreen(); |
94 void ExecuteJsInSigninFrame(const std::string& js); | 97 void ExecuteJsInSigninFrame(const std::string& js); |
95 void SetSignFormField(const std::string& field_id, | 98 void SetSignFormField(const std::string& field_id, |
96 const std::string& field_value); | 99 const std::string& field_value); |
97 | 100 |
98 scoped_ptr<FakeGaia> fake_gaia_; | 101 scoped_ptr<FakeGaia> fake_gaia_; |
99 NetworkPortalDetectorTestImpl* network_portal_detector_; | 102 NetworkPortalDetectorTestImpl* network_portal_detector_; |
100 | 103 |
101 // Whether to use background networking. Note this is only effective when it | 104 // Whether to use background networking. Note this is only effective when it |
102 // is set before SetUpCommandLine is invoked. | 105 // is set before SetUpCommandLine is invoked. |
103 bool needs_background_networking_; | 106 bool needs_background_networking_; |
104 | 107 |
105 scoped_ptr<content::WindowedNotificationObserver> login_screen_load_observer_; | 108 scoped_ptr<content::WindowedNotificationObserver> login_screen_load_observer_; |
106 scoped_ptr<extensions::ScopedCurrentChannel> scoped_channel_; | 109 scoped_ptr<extensions::ScopedCurrentChannel> scoped_channel_; |
107 HTTPSForwarder gaia_https_forwarder_; | 110 HTTPSForwarder gaia_https_forwarder_; |
108 std::string gaia_frame_parent_; | 111 std::string gaia_frame_parent_; |
109 bool initialize_fake_merge_session_; | 112 bool initialize_fake_merge_session_; |
110 test::JSChecker js_checker_; | 113 test::JSChecker js_checker_; |
111 | 114 |
112 DISALLOW_COPY_AND_ASSIGN(OobeBaseTest); | 115 DISALLOW_COPY_AND_ASSIGN(OobeBaseTest); |
113 }; | 116 }; |
114 | 117 |
115 } // namespace chromeos | 118 } // namespace chromeos |
116 | 119 |
117 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ | 120 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ |
OLD | NEW |