| 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 587 |
| 588 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 588 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 589 PostWithPasswordBrowserClose) { | 589 PostWithPasswordBrowserClose) { |
| 590 PostFormWithPage("post_with_password.html", true); | 590 PostFormWithPage("post_with_password.html", true); |
| 591 Browser* new_browser = QuitBrowserAndRestore(browser(), false); | 591 Browser* new_browser = QuitBrowserAndRestore(browser(), false); |
| 592 CheckReloadedPageRestored(new_browser); | 592 CheckReloadedPageRestored(new_browser); |
| 593 // The form data contained passwords, so it's removed completely. | 593 // The form data contained passwords, so it's removed completely. |
| 594 CheckFormRestored(new_browser, false, false); | 594 CheckFormRestored(new_browser, false, false); |
| 595 } | 595 } |
| 596 | 596 |
| 597 // Flaky on Mac: https://crbug.com/709504 |
| 598 #if defined(OS_MACOSX) |
| 599 #define MAYBE_SessionCookiesCloseAllBrowsers \ |
| 600 DISABLED_SessionCookiesCloseAllBrowsers |
| 601 #else |
| 602 #define MAYBE_SessionCookiesCloseAllBrowsers SessionCookiesCloseAllBrowsers |
| 603 #endif |
| 597 // Check that session cookies are cleared on a wrench menu quit. | 604 // Check that session cookies are cleared on a wrench menu quit. |
| 598 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 605 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 599 SessionCookiesCloseAllBrowsers) { | 606 MAYBE_SessionCookiesCloseAllBrowsers) { |
| 600 // Set the startup preference to "continue where I left off" and visit a page | 607 // Set the startup preference to "continue where I left off" and visit a page |
| 601 // which stores a session cookie. | 608 // which stores a session cookie. |
| 602 StoreDataWithPage("session_cookies.html"); | 609 StoreDataWithPage("session_cookies.html"); |
| 603 Browser* new_browser = QuitBrowserAndRestore(browser(), true); | 610 Browser* new_browser = QuitBrowserAndRestore(browser(), true); |
| 604 // The browsing session will be continued; just wait for the page to reload | 611 // The browsing session will be continued; just wait for the page to reload |
| 605 // and check the stored data. | 612 // and check the stored data. |
| 606 CheckReloadedPageRestored(new_browser); | 613 CheckReloadedPageRestored(new_browser); |
| 607 } | 614 } |
| 608 | 615 |
| 609 // Check that cookies are cleared on a wrench menu quit only if cookies are set | 616 // Check that cookies are cleared on a wrench menu quit only if cookies are set |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 CookieSettingsFactory::GetForProfile(new_browser->profile()) | 903 CookieSettingsFactory::GetForProfile(new_browser->profile()) |
| 897 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 904 ->SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 898 // ... even if background mode is active. | 905 // ... even if background mode is active. |
| 899 EnableBackgroundMode(); | 906 EnableBackgroundMode(); |
| 900 new_browser = QuitBrowserAndRestore(new_browser, true); | 907 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 901 StoreDataWithPage(new_browser, "cookies.html"); | 908 StoreDataWithPage(new_browser, "cookies.html"); |
| 902 DisableBackgroundMode(); | 909 DisableBackgroundMode(); |
| 903 new_browser = QuitBrowserAndRestore(new_browser, true); | 910 new_browser = QuitBrowserAndRestore(new_browser, true); |
| 904 StoreDataWithPage(new_browser, "cookies.html"); | 911 StoreDataWithPage(new_browser, "cookies.html"); |
| 905 } | 912 } |
| OLD | NEW |