| 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. |
| 464 #if defined(OS_MACOSX) |
| 465 #define MAYBE_CookiesClearedOnExit DISABLED_CookiesClearedOnExit |
| 466 #else |
| 467 #define MAYBE_CookiesClearedOnExit CookiesClearedOnExit |
| 468 #endif |
| 463 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, CookiesClearedOnExit) { | 469 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, CookiesClearedOnExit) { |
| 464 CheckReloadedPageNotRestored(); | 470 CheckReloadedPageNotRestored(); |
| 465 } | 471 } |
| 466 | 472 |
| 467 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { | 473 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_Post) { |
| 468 PostFormWithPage("post.html", false); | 474 PostFormWithPage("post.html", false); |
| 469 } | 475 } |
| 470 | 476 |
| 471 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { | 477 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, Post) { |
| 472 CheckFormRestored(true, false); | 478 CheckFormRestored(true, false); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 894 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 889 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 895 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 890 // ... even if background mode is active. | 896 // ... even if background mode is active. |
| 891 EnableBackgroundMode(); | 897 EnableBackgroundMode(); |
| 892 new_browser = QuitBrowserAndRestore(new_browser, true); | 898 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 893 StoreDataWithPage(new_browser, "cookies.html"); | 899 StoreDataWithPage(new_browser, "cookies.html"); |
| 894 DisableBackgroundMode(); | 900 DisableBackgroundMode(); |
| 895 new_browser = QuitBrowserAndRestore(new_browser, true); | 901 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 896 StoreDataWithPage(new_browser, "cookies.html"); | 902 StoreDataWithPage(new_browser, "cookies.html"); |
| 897 } | 903 } |
| OLD | NEW |