| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 | 454 |
| 455 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_CookiesClearedOnExit) { | 455 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_CookiesClearedOnExit) { |
| 456 // Normally cookies are restored. | 456 // Normally cookies are restored. |
| 457 CheckReloadedPageRestored(); | 457 CheckReloadedPageRestored(); |
| 458 // ... but not if the content setting is set to clear on exit. | 458 // ... but not if the content setting is set to clear on exit. |
| 459 CookieSettingsFactory::GetForProfile(browser()->profile()) | 459 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 460 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 460 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Flaky. http://crbug.com/656211, http://crbug.com/700683 | 463 // Flaky on Mac. http://crbug.com/656211. |
| 464 #if defined(OS_MACOSX) | 464 #if defined(OS_MACOSX) |
| 465 #define MAYBE_CookiesClearedOnExit DISABLED_CookiesClearedOnExit | 465 #define MAYBE_CookiesClearedOnExit DISABLED_CookiesClearedOnExit |
| 466 #else | 466 #else |
| 467 #define MAYBE_CookiesClearedOnExit CookiesClearedOnExit | 467 #define MAYBE_CookiesClearedOnExit CookiesClearedOnExit |
| 468 #endif | 468 #endif |
| 469 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 469 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, MAYBE_CookiesClearedOnExit) { |
| 470 DISABLED_CookiesClearedOnExit) { | |
| 471 CheckReloadedPageNotRestored(); | 470 CheckReloadedPageNotRestored(); |
| 472 } | 471 } |
| 473 | 472 |
| 474 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { | 473 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { |
| 475 PostFormWithPage("post.html", false); | 474 PostFormWithPage("post.html", false); |
| 476 } | 475 } |
| 477 | 476 |
| 478 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { | 477 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { |
| 479 CheckFormRestored(true, false); | 478 CheckFormRestored(true, false); |
| 480 } | 479 } |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 CheckReloadedPageRestored(); | 681 CheckReloadedPageRestored(); |
| 683 } | 682 } |
| 684 | 683 |
| 685 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_LocalStorageClearedOnExit) { | 684 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_LocalStorageClearedOnExit) { |
| 686 StoreDataWithPage("local_storage.html"); | 685 StoreDataWithPage("local_storage.html"); |
| 687 CookieSettingsFactory::GetForProfile(browser()->profile()) | 686 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 688 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 687 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 689 Restart(); | 688 Restart(); |
| 690 } | 689 } |
| 691 | 690 |
| 692 // Flaky(crbug.com/700694) | 691 IN_PROC_BROWSER_TEST_F(RestartTest, LocalStorageClearedOnExit) { |
| 693 IN_PROC_BROWSER_TEST_F(RestartTest, DISABLED_LocalStorageClearedOnExit) { | |
| 694 CheckReloadedPageRestored(); | 692 CheckReloadedPageRestored(); |
| 695 } | 693 } |
| 696 | 694 |
| 697 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { | 695 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { |
| 698 StoreDataWithPage("cookies.html"); | 696 StoreDataWithPage("cookies.html"); |
| 699 CookieSettingsFactory::GetForProfile(browser()->profile()) | 697 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 700 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 698 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 701 Restart(); | 699 Restart(); |
| 702 } | 700 } |
| 703 | 701 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 894 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 897 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 895 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 898 // ... even if background mode is active. | 896 // ... even if background mode is active. |
| 899 EnableBackgroundMode(); | 897 EnableBackgroundMode(); |
| 900 new_browser = QuitBrowserAndRestore(new_browser, true); | 898 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 901 StoreDataWithPage(new_browser, "cookies.html"); | 899 StoreDataWithPage(new_browser, "cookies.html"); |
| 902 DisableBackgroundMode(); | 900 DisableBackgroundMode(); |
| 903 new_browser = QuitBrowserAndRestore(new_browser, true); | 901 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 904 StoreDataWithPage(new_browser, "cookies.html"); | 902 StoreDataWithPage(new_browser, "cookies.html"); |
| 905 } | 903 } |
| OLD | NEW |