| 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 on Mac. http://crbug.com/656211. | 463 // Flaky. http://crbug.com/656211, http://crbug.com/700683 |
| 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, MAYBE_CookiesClearedOnExit) { | 469 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 470 DISABLED_CookiesClearedOnExit) { |
| 470 CheckReloadedPageNotRestored(); | 471 CheckReloadedPageNotRestored(); |
| 471 } | 472 } |
| 472 | 473 |
| 473 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { | 474 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { |
| 474 PostFormWithPage("post.html", false); | 475 PostFormWithPage("post.html", false); |
| 475 } | 476 } |
| 476 | 477 |
| 477 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { | 478 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { |
| 478 CheckFormRestored(true, false); | 479 CheckFormRestored(true, false); |
| 479 } | 480 } |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 CheckReloadedPageRestored(); | 682 CheckReloadedPageRestored(); |
| 682 } | 683 } |
| 683 | 684 |
| 684 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_LocalStorageClearedOnExit) { | 685 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_LocalStorageClearedOnExit) { |
| 685 StoreDataWithPage("local_storage.html"); | 686 StoreDataWithPage("local_storage.html"); |
| 686 CookieSettingsFactory::GetForProfile(browser()->profile()) | 687 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 687 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 688 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 688 Restart(); | 689 Restart(); |
| 689 } | 690 } |
| 690 | 691 |
| 691 IN_PROC_BROWSER_TEST_F(RestartTest, LocalStorageClearedOnExit) { | 692 // Flaky(crbug.com/700694) |
| 693 IN_PROC_BROWSER_TEST_F(RestartTest, DISABLED_LocalStorageClearedOnExit) { |
| 692 CheckReloadedPageRestored(); | 694 CheckReloadedPageRestored(); |
| 693 } | 695 } |
| 694 | 696 |
| 695 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { | 697 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_CookiesClearedOnExit) { |
| 696 StoreDataWithPage("cookies.html"); | 698 StoreDataWithPage("cookies.html"); |
| 697 CookieSettingsFactory::GetForProfile(browser()->profile()) | 699 CookieSettingsFactory::GetForProfile(browser()->profile()) |
| 698 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 700 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 699 Restart(); | 701 Restart(); |
| 700 } | 702 } |
| 701 | 703 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 896 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 895 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 897 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 896 // ... even if background mode is active. | 898 // ... even if background mode is active. |
| 897 EnableBackgroundMode(); | 899 EnableBackgroundMode(); |
| 898 new_browser = QuitBrowserAndRestore(new_browser, true); | 900 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 899 StoreDataWithPage(new_browser, "cookies.html"); | 901 StoreDataWithPage(new_browser, "cookies.html"); |
| 900 DisableBackgroundMode(); | 902 DisableBackgroundMode(); |
| 901 new_browser = QuitBrowserAndRestore(new_browser, true); | 903 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 902 StoreDataWithPage(new_browser, "cookies.html"); | 904 StoreDataWithPage(new_browser, "cookies.html"); |
| 903 } | 905 } |
| OLD | NEW |