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

Unified Diff: chrome/browser/ui/browser_list_unittest.cc

Issue 8916006: Revert 114441 - Follow-up changes to http://codereview.chromium.org/8937001 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_init_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list_unittest.cc
===================================================================
--- chrome/browser/ui/browser_list_unittest.cc (revision 114451)
+++ chrome/browser/ui/browser_list_unittest.cc (working copy)
@@ -2,19 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/background_printing_manager.h"
-#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_browser_process.h"
-#include "chrome/test/base/testing_pref_service.h"
-#include "chrome/test/base/testing_profile_manager.h"
#include "content/browser/tab_contents/tab_contents.h"
typedef BrowserWithTestWindowTest BrowserListTest;
@@ -239,26 +232,3 @@
EXPECT_EQ(0U, CountAllTabs());
}
#endif
-
-TEST_F(BrowserListTest, AttemptRestart) {
- ASSERT_TRUE(g_browser_process);
- TestingPrefService testing_pref_service;
- testing_pref_service.RegisterBooleanPref(prefs::kWasRestarted, false);
- testing_pref_service.RegisterBooleanPref(prefs::kRestartLastSessionOnShutdown,
- false);
-
- TestingBrowserProcess* testing_browser_process =
- static_cast<TestingBrowserProcess*>(g_browser_process);
- testing_browser_process->SetLocalState(&testing_pref_service);
- ASSERT_TRUE(g_browser_process->local_state());
- ProfileManager* profile_manager = new ProfileManager(FilePath());
- testing_browser_process->SetProfileManager(profile_manager);
-
- BrowserList::AttemptRestart();
- // Cancel the effects of us calling BrowserList::AttemptRestart. Otherwise
- // tests ran after this one will fail.
- browser_shutdown::SetTryingToQuit(false);
-
- EXPECT_TRUE(testing_pref_service.GetBoolean(prefs::kWasRestarted));
- testing_browser_process->SetLocalState(NULL);
-}
« no previous file with comments | « chrome/browser/ui/browser_init_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698