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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
6 #include "ash/system/tray/system_tray.h" | 6 #include "ash/system/tray/system_tray.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 10 #include "chrome/browser/chromeos/login/login_manager_test.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 } | 68 } |
69 }; | 69 }; |
70 | 70 |
71 class LoginSigninTest : public InProcessBrowserTest { | 71 class LoginSigninTest : public InProcessBrowserTest { |
72 protected: | 72 protected: |
73 void SetUpCommandLine(base::CommandLine* command_line) override { | 73 void SetUpCommandLine(base::CommandLine* command_line) override { |
74 command_line->AppendSwitch(switches::kLoginManager); | 74 command_line->AppendSwitch(switches::kLoginManager); |
75 command_line->AppendSwitch(switches::kForceLoginManagerInTests); | 75 command_line->AppendSwitch(switches::kForceLoginManagerInTests); |
76 } | 76 } |
77 | 77 |
78 void TearDownOnMainThread() override { | |
79 // Close the login manager, which otherwise holds a KeepAlive that is not | |
80 // cleared in time by the end of the test. | |
81 LoginDisplayHost::default_host()->Finalize(); | |
dgn
2016/03/11 22:15:04
This is what would need to be added in all the pla
| |
82 } | |
83 | |
78 void SetUpOnMainThread() override { | 84 void SetUpOnMainThread() override { |
79 LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest(); | 85 LoginDisplayHostImpl::DisableRestrictiveProxyCheckForTest(); |
80 | 86 |
81 ASSERT_TRUE(tracing::BeginTracingWithWatch( | 87 ASSERT_TRUE(tracing::BeginTracingWithWatch( |
82 "ui", "ui", "ShowLoginWebUI", 1)); | 88 "ui", "ui", "ShowLoginWebUI", 1)); |
83 } | 89 } |
84 }; | 90 }; |
85 | 91 |
86 class LoginTest : public LoginManagerTest { | 92 class LoginTest : public LoginManagerTest { |
87 public: | 93 public: |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 content::WindowedNotificationObserver session_start_waiter( | 260 content::WindowedNotificationObserver session_start_waiter( |
255 chrome::NOTIFICATION_SESSION_STARTED, | 261 chrome::NOTIFICATION_SESSION_STARTED, |
256 content::NotificationService::AllSources()); | 262 content::NotificationService::AllSources()); |
257 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); | 263 SubmitGaiaAuthOfflineForm(kTestUser, kPassword); |
258 session_start_waiter.Wait(); | 264 session_start_waiter.Wait(); |
259 | 265 |
260 TestSystemTrayIsVisible(); | 266 TestSystemTrayIsVisible(); |
261 } | 267 } |
262 | 268 |
263 } // namespace chromeos | 269 } // namespace chromeos |
OLD | NEW |