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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "chrome/browser/chromeos/login/test/https_forwarder.h" | 12 #include "chrome/browser/chromeos/login/test/https_forwarder.h" |
13 #include "chrome/browser/chromeos/login/test/js_checker.h" | |
13 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 14 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
14 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" | 15 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" |
15 #include "chrome/browser/extensions/extension_apitest.h" | 16 #include "chrome/browser/extensions/extension_apitest.h" |
16 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
17 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
18 #include "google_apis/gaia/fake_gaia.h" | 19 #include "google_apis/gaia/fake_gaia.h" |
19 #include "net/test/embedded_test_server/embedded_test_server.h" | 20 #include "net/test/embedded_test_server/embedded_test_server.h" |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 class WebUI; | 23 class WebUI; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 void SimulateNetworkOnline(); | 67 void SimulateNetworkOnline(); |
67 void SimulateNetworkPortal(); | 68 void SimulateNetworkPortal(); |
68 | 69 |
69 base::Closure SimulateNetworkOfflineClosure(); | 70 base::Closure SimulateNetworkOfflineClosure(); |
70 base::Closure SimulateNetworkOnlineClosure(); | 71 base::Closure SimulateNetworkOnlineClosure(); |
71 base::Closure SimulateNetworkPortalClosure(); | 72 base::Closure SimulateNetworkPortalClosure(); |
72 | 73 |
73 // Checks JavaScript |expression| in login screen. | 74 // Checks JavaScript |expression| in login screen. |
74 void JsExpect(const std::string& expression); | 75 void JsExpect(const std::string& expression); |
75 | 76 |
77 test::JSChecker& JS() { return js_checker_; } | |
achuithb
2015/05/26 06:28:21
I think returning a pointer is preferred to a non-
dzhioev (left Google)
2015/05/26 21:18:15
Why? I don't see any advantage in that.
achuithb
2015/05/26 21:26:44
This is for arguments, but I think the logic also
| |
78 | |
76 bool use_webview() { return use_webview_; } | 79 bool use_webview() { return use_webview_; } |
77 void set_use_webview(bool use_webview) { use_webview_ = use_webview; } | 80 void set_use_webview(bool use_webview) { use_webview_ = use_webview; } |
78 | 81 |
79 bool initialize_fake_merge_session() { | 82 bool initialize_fake_merge_session() { |
80 return initialize_fake_merge_session_; | 83 return initialize_fake_merge_session_; |
81 } | 84 } |
82 void set_initialize_fake_merge_session(bool value) { | 85 void set_initialize_fake_merge_session(bool value) { |
83 initialize_fake_merge_session_ = value; | 86 initialize_fake_merge_session_ = value; |
84 } | 87 } |
85 | 88 |
(...skipping 15 matching lines...) Expand all Loading... | |
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 use_webview_; | 112 bool use_webview_; |
110 bool initialize_fake_merge_session_; | 113 bool initialize_fake_merge_session_; |
114 test::JSChecker js_checker_; | |
111 | 115 |
112 DISALLOW_COPY_AND_ASSIGN(OobeBaseTest); | 116 DISALLOW_COPY_AND_ASSIGN(OobeBaseTest); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace chromeos | 119 } // namespace chromeos |
116 | 120 |
117 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ | 121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_OOBE_BASE_TEST_H_ |
OLD | NEW |