| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 430 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 431 PRE_LocalStorageClearedOnExit) { | 431 PRE_LocalStorageClearedOnExit) { |
| 432 // Normally localStorage is restored. | 432 // Normally localStorage is restored. |
| 433 CheckReloadedPageRestored(); | 433 CheckReloadedPageRestored(); |
| 434 // ... but not if it's set to clear on exit. | 434 // ... but not if it's set to clear on exit. |
| 435 CookieSettingsFactory::GetForProfile(browser()->profile()) | 435 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 436 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 436 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 437 } | 437 } |
| 438 | 438 |
| 439 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, LocalStorageClearedOnExit) { | 439 // Crashes on Mac only. http://crbug.com/656211 |
| 440 #if defined(OS_MACOSX) |
| 441 #define MAYBE_LocalStorageClearedOnExit DISABLED_LocalStorageClearedOnExit |
| 442 #else |
| 443 #define MAYBE_LocalStorageClearedOnExit LocalStorageClearedOnExit |
| 444 #endif |
| 445 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 446 MAYBE_LocalStorageClearedOnExit) { |
| 440 CheckReloadedPageNotRestored(); | 447 CheckReloadedPageNotRestored(); |
| 441 } | 448 } |
| 442 | 449 |
| 443 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 450 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 444 PRE_PRE_CookiesClearedOnExit) { | 451 PRE_PRE_CookiesClearedOnExit) { |
| 445 StoreDataWithPage("cookies.html"); | 452 StoreDataWithPage("cookies.html"); |
| 446 } | 453 } |
| 447 | 454 |
| 448 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_CookiesClearedOnExit) { | 455 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_CookiesClearedOnExit) { |
| 449 // Normally cookies are restored. | 456 // Normally cookies are restored. |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 888 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 882 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 889 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 883 // ... even if background mode is active. | 890 // ... even if background mode is active. |
| 884 EnableBackgroundMode(); | 891 EnableBackgroundMode(); |
| 885 new_browser = QuitBrowserAndRestore(new_browser, true); | 892 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 886 StoreDataWithPage(new_browser, "cookies.html"); | 893 StoreDataWithPage(new_browser, "cookies.html"); |
| 887 DisableBackgroundMode(); | 894 DisableBackgroundMode(); |
| 888 new_browser = QuitBrowserAndRestore(new_browser, true); | 895 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 889 StoreDataWithPage(new_browser, "cookies.html"); | 896 StoreDataWithPage(new_browser, "cookies.html"); |
| 890 } | 897 } |
| OLD | NEW |