| 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 "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | 5 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 message_center::MessageCenter::Initialize(); | 189 message_center::MessageCenter::Initialize(); |
| 190 TestingBrowserProcess* testing_browser_process = | 190 TestingBrowserProcess* testing_browser_process = |
| 191 TestingBrowserProcess::GetGlobal(); | 191 TestingBrowserProcess::GetGlobal(); |
| 192 testing_browser_process->SetLocalState(&testing_pref_service); | 192 testing_browser_process->SetLocalState(&testing_pref_service); |
| 193 ASSERT_TRUE(g_browser_process->local_state()); | 193 ASSERT_TRUE(g_browser_process->local_state()); |
| 194 ProfileManager* profile_manager = new ProfileManager(base::FilePath()); | 194 ProfileManager* profile_manager = new ProfileManager(base::FilePath()); |
| 195 testing_browser_process->SetProfileManager(profile_manager); | 195 testing_browser_process->SetProfileManager(profile_manager); |
| 196 | 196 |
| 197 chrome::AttemptRestart(); | 197 chrome::AttemptRestart(); |
| 198 EXPECT_TRUE(testing_pref_service.GetBoolean(prefs::kWasRestarted)); |
| 199 |
| 198 // Cancel the effects of us calling chrome::AttemptRestart. Otherwise tests | 200 // Cancel the effects of us calling chrome::AttemptRestart. Otherwise tests |
| 199 // ran after this one will fail. | 201 // ran after this one will fail. |
| 200 browser_shutdown::SetTryingToQuit(false); | 202 browser_shutdown::SetTryingToQuit(false); |
| 201 | 203 |
| 202 EXPECT_TRUE(testing_pref_service.GetBoolean(prefs::kWasRestarted)); | |
| 203 testing_browser_process->SetLocalState(NULL); | 204 testing_browser_process->SetLocalState(NULL); |
| 204 } | 205 } |
| OLD | NEW |