OLD | NEW |
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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/signin/signin_promo.h" | 6 #include "chrome/browser/signin/signin_promo.h" |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 9 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
10 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 10 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void SetUp() override { | 157 void SetUp() override { |
158 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 158 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
159 | 159 |
160 // EmbeddedTestServer spawns a thread to initialize socket. | 160 // EmbeddedTestServer spawns a thread to initialize socket. |
161 // Stop IO thread in preparation for fork and exec. | 161 // Stop IO thread in preparation for fork and exec. |
162 embedded_test_server()->StopThread(); | 162 embedded_test_server()->StopThread(); |
163 | 163 |
164 InProcessBrowserTest::SetUp(); | 164 InProcessBrowserTest::SetUp(); |
165 } | 165 } |
166 | 166 |
167 void SetUpCommandLine(CommandLine* command_line) override { | 167 void SetUpCommandLine(base::CommandLine* command_line) override { |
168 const GURL& base_url = embedded_test_server()->base_url(); | 168 const GURL& base_url = embedded_test_server()->base_url(); |
169 command_line->AppendSwitchASCII(::switches::kGaiaUrl, base_url.spec()); | 169 command_line->AppendSwitchASCII(::switches::kGaiaUrl, base_url.spec()); |
170 command_line->AppendSwitchASCII(::switches::kLsoUrl, base_url.spec()); | 170 command_line->AppendSwitchASCII(::switches::kLsoUrl, base_url.spec()); |
171 command_line->AppendSwitchASCII(::switches::kGoogleApisUrl, | 171 command_line->AppendSwitchASCII(::switches::kGoogleApisUrl, |
172 base_url.spec()); | 172 base_url.spec()); |
173 } | 173 } |
174 | 174 |
175 void SetUpOnMainThread() override { | 175 void SetUpOnMainThread() override { |
176 embedded_test_server()->RestartThreadAndListen(); | 176 embedded_test_server()->RestartThreadAndListen(); |
177 | 177 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 ->AddObserver(&observer); | 291 ->AddObserver(&observer); |
292 base::RunLoop run_loop; | 292 base::RunLoop run_loop; |
293 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) | 293 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) |
294 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); | 294 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); |
295 | 295 |
296 ExecuteJsToSigninInSigninFrame(browser(), "email", "password"); | 296 ExecuteJsToSigninInSigninFrame(browser(), "email", "password"); |
297 run_loop.Run(); | 297 run_loop.Run(); |
298 base::MessageLoop::current()->RunUntilIdle(); | 298 base::MessageLoop::current()->RunUntilIdle(); |
299 } | 299 } |
300 #endif // OS_CHROMEOS | 300 #endif // OS_CHROMEOS |
OLD | NEW |