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 "chrome/browser/chromeos/login/login_manager_test.h" | 5 #include "chrome/browser/chromeos/login/login_manager_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "components/user_manager/user_manager.h" | 26 #include "components/user_manager/user_manager.h" |
27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
29 #include "content/public/test/browser_test_utils.h" | 29 #include "content/public/test/browser_test_utils.h" |
30 #include "content/public/test/test_utils.h" | 30 #include "content/public/test/test_utils.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 | 32 |
33 namespace chromeos { | 33 namespace chromeos { |
34 | 34 |
35 LoginManagerTest::LoginManagerTest(bool should_launch_browser) | 35 LoginManagerTest::LoginManagerTest(bool should_launch_browser) |
36 : use_webview_(false), | 36 : use_webview_(true), |
37 should_launch_browser_(should_launch_browser), | 37 should_launch_browser_(should_launch_browser), |
38 web_contents_(NULL) { | 38 web_contents_(NULL) { |
39 set_exit_when_last_browser_closes(false); | 39 set_exit_when_last_browser_closes(false); |
40 } | 40 } |
41 | 41 |
42 void LoginManagerTest::TearDownOnMainThread() { | 42 void LoginManagerTest::TearDownOnMainThread() { |
43 MixinBasedBrowserTest::TearDownOnMainThread(); | 43 MixinBasedBrowserTest::TearDownOnMainThread(); |
44 if (LoginDisplayHostImpl::default_host()) | 44 if (LoginDisplayHostImpl::default_host()) |
45 LoginDisplayHostImpl::default_host()->Finalize(); | 45 LoginDisplayHostImpl::default_host()->Finalize(); |
46 base::MessageLoop::current()->RunUntilIdle(); | 46 base::MessageLoop::current()->RunUntilIdle(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 EXPECT_TRUE(host != NULL); | 164 EXPECT_TRUE(host != NULL); |
165 | 165 |
166 content::WebContents* web_contents = | 166 content::WebContents* web_contents = |
167 host->GetWebUILoginView()->GetWebContents(); | 167 host->GetWebUILoginView()->GetWebContents(); |
168 EXPECT_TRUE(web_contents != NULL); | 168 EXPECT_TRUE(web_contents != NULL); |
169 set_web_contents(web_contents); | 169 set_web_contents(web_contents); |
170 js_checker_.set_web_contents(web_contents); | 170 js_checker_.set_web_contents(web_contents); |
171 } | 171 } |
172 | 172 |
173 } // namespace chromeos | 173 } // namespace chromeos |
OLD | NEW |