| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PostWithPassword) { | 359 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PostWithPassword) { |
| 360 CheckReloadedPageRestored(); | 360 CheckReloadedPageRestored(); |
| 361 // The form data contained passwords, so it's removed completely. | 361 // The form data contained passwords, so it's removed completely. |
| 362 CheckFormRestored(false, false); | 362 CheckFormRestored(false, false); |
| 363 } | 363 } |
| 364 | 364 |
| 365 class RestartTest : public BetterSessionRestoreTest { | 365 class RestartTest : public BetterSessionRestoreTest { |
| 366 public: | 366 public: |
| 367 RestartTest() { } | 367 RestartTest() { } |
| 368 ~RestartTest() { } | 368 virtual ~RestartTest() { } |
| 369 protected: | 369 protected: |
| 370 void Restart() { | 370 void Restart() { |
| 371 // Simluate restarting the browser, but let the test exit peacefully. | 371 // Simluate restarting the browser, but let the test exit peacefully. |
| 372 BrowserList::const_iterator it; | 372 BrowserList::const_iterator it; |
| 373 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) | 373 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) |
| 374 content::BrowserContext::SaveSessionState((*it)->profile()); | 374 content::BrowserContext::SaveSessionState((*it)->profile()); |
| 375 PrefService* pref_service = g_browser_process->local_state(); | 375 PrefService* pref_service = g_browser_process->local_state(); |
| 376 pref_service->SetBoolean(prefs::kWasRestarted, true); | 376 pref_service->SetBoolean(prefs::kWasRestarted, true); |
| 377 #if defined(OS_WIN) | 377 #if defined(OS_WIN) |
| 378 if (pref_service->HasPrefPath(prefs::kRestartSwitchMode)) | 378 if (pref_service->HasPrefPath(prefs::kRestartSwitchMode)) |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 597 } |
| 598 | 598 |
| 599 private: | 599 private: |
| 600 DISALLOW_COPY_AND_ASSIGN(BetterSessionRestoreCrashTest); | 600 DISALLOW_COPY_AND_ASSIGN(BetterSessionRestoreCrashTest); |
| 601 }; | 601 }; |
| 602 | 602 |
| 603 // http://crbug.com/172770 | 603 // http://crbug.com/172770 |
| 604 IN_PROC_BROWSER_TEST_F(BetterSessionRestoreCrashTest, DISABLED_SessionCookies) { | 604 IN_PROC_BROWSER_TEST_F(BetterSessionRestoreCrashTest, DISABLED_SessionCookies) { |
| 605 CrashTestWithPage("session_cookies.html"); | 605 CrashTestWithPage("session_cookies.html"); |
| 606 } | 606 } |
| OLD | NEW |