| 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 | 683 |
| 684 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_SessionStorage) { | 684 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_SessionStorage) { |
| 685 StoreDataWithPage("session_storage.html"); | 685 StoreDataWithPage("session_storage.html"); |
| 686 Restart(); | 686 Restart(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 IN_PROC_BROWSER_TEST_F(RestartTest, SessionStorage) { | 689 IN_PROC_BROWSER_TEST_F(RestartTest, SessionStorage) { |
| 690 CheckReloadedPageRestored(); | 690 CheckReloadedPageRestored(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 // TODO(crbug.com/717740): This test is flaky on Mac. | 693 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_LocalStorageClearedOnExit) { |
| 694 #if defined(OS_MACOSX) | |
| 695 #define MAYBE_PRE_LocalStorageClearedOnExit \ | |
| 696 DISABLED_PRE_LocalStorageClearedOnExit | |
| 697 #else | |
| 698 #define MAYBE_PRE_LocalStorageClearedOnExit PRE_LocalStorageClearedOnExit | |
| 699 #endif | |
| 700 IN_PROC_BROWSER_TEST_F(RestartTest, MAYBE_PRE_LocalStorageClearedOnExit) { | |
| 701 StoreDataWithPage("local_storage.html"); | 694 StoreDataWithPage("local_storage.html"); |
| 702 CookieSettingsFactory::GetForProfile(browser()->profile()) | 695 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 703 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 696 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 704 Restart(); | 697 Restart(); |
| 705 } | 698 } |
| 706 | 699 |
| 707 // TODO(crbug.com/717740): This test is flaky on Mac. | 700 IN_PROC_BROWSER_TEST_F(RestartTest, LocalStorageClearedOnExit) { |
| 708 #if defined(OS_MACOSX) | |
| 709 #define MAYBE_LocalStorageClearedOnExit DISABLED_LocalStorageClearedOnExit | |
| 710 #else | |
| 711 #define MAYBE_LocalStorageClearedOnExit LocalStorageClearedOnExit | |
| 712 #endif | |
| 713 IN_PROC_BROWSER_TEST_F(RestartTest, MAYBE_LocalStorageClearedOnExit) { | |
| 714 CheckReloadedPageRestored(); | 701 CheckReloadedPageRestored(); |
| 715 } | 702 } |
| 716 | 703 |
| 717 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { | 704 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { |
| 718 StoreDataWithPage("cookies.html"); | 705 StoreDataWithPage("cookies.html"); |
| 719 CookieSettingsFactory::GetForProfile(browser()->profile()) | 706 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 720 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 707 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 721 Restart(); | 708 Restart(); |
| 722 } | 709 } |
| 723 | 710 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 903 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 917 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 904 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 918 // ... even if background mode is active. | 905 // ... even if background mode is active. |
| 919 EnableBackgroundMode(); | 906 EnableBackgroundMode(); |
| 920 new_browser = QuitBrowserAndRestore(new_browser, true); | 907 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 921 StoreDataWithPage(new_browser, "cookies.html"); | 908 StoreDataWithPage(new_browser, "cookies.html"); |
| 922 DisableBackgroundMode(); | 909 DisableBackgroundMode(); |
| 923 new_browser = QuitBrowserAndRestore(new_browser, true); | 910 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 924 StoreDataWithPage(new_browser, "cookies.html"); | 911 StoreDataWithPage(new_browser, "cookies.html"); |
| 925 } | 912 } |
| OLD | NEW |