Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Side by Side Diff: chrome/browser/chromeos/login/login_browsertest.cc

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
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
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
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_platform_part_chromeos.cc ('k') | chrome/browser/chromeos/login/ui/login_display_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698