| 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 #defined 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 IN_PROC_BROWSER_TEST_F(RestartTest, LocalStorageClearedOnExit) { | 700 IN_PROC_BROWSER_TEST_F(RestartTest, LocalStorageClearedOnExit) { |
| 708 CheckReloadedPageRestored(); | 701 CheckReloadedPageRestored(); |
| 709 } | 702 } |
| 710 | 703 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 903 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 911 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 904 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 912 // ... even if background mode is active. | 905 // ... even if background mode is active. |
| 913 EnableBackgroundMode(); | 906 EnableBackgroundMode(); |
| 914 new_browser = QuitBrowserAndRestore(new_browser, true); | 907 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 915 StoreDataWithPage(new_browser, "cookies.html"); | 908 StoreDataWithPage(new_browser, "cookies.html"); |
| 916 DisableBackgroundMode(); | 909 DisableBackgroundMode(); |
| 917 new_browser = QuitBrowserAndRestore(new_browser, true); | 910 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 918 StoreDataWithPage(new_browser, "cookies.html"); | 911 StoreDataWithPage(new_browser, "cookies.html"); |
| 919 } | 912 } |
| OLD | NEW |