| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 StoreDataWithPage("local_storage.html"); | 251 StoreDataWithPage("local_storage.html"); |
| 252 } | 252 } |
| 253 | 253 |
| 254 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 254 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 255 PRE_LocalStorageClearedOnExit) { | 255 PRE_LocalStorageClearedOnExit) { |
| 256 // Normally localStorage is restored. | 256 // Normally localStorage is restored. |
| 257 CheckReloadedPageRestored(); | 257 CheckReloadedPageRestored(); |
| 258 // ... but not if it's set to clear on exit. | 258 // ... but not if it's set to clear on exit. |
| 259 CookieSettings::Factory::GetForProfile(browser()->profile())-> | 259 CookieSettings::Factory::GetForProfile(browser()->profile())-> |
| 260 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 260 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
| 261 LOG(ERROR) << "we've now set the session only preference"; |
| 261 } | 262 } |
| 262 | 263 |
| 263 // Flaky on Linux: http://crbug.com/163096 | 264 // Flaky on Linux: http://crbug.com/163096 |
| 264 #if defined(OS_LINUX) | |
| 265 #define MAYBE_LocalStorageClearedOnExit DISABLED_LocalStorageClearedOnExit | |
| 266 #else | |
| 267 #define MAYBE_LocalStorageClearedOnExit LocalStorageClearedOnExit | |
| 268 #endif | |
| 269 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 265 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 270 MAYBE_LocalStorageClearedOnExit) { | 266 LocalStorageClearedOnExit) { |
| 271 CheckReloadedPageNotRestored(); | 267 CheckReloadedPageNotRestored(); |
| 272 } | 268 } |
| 273 | 269 |
| 274 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 270 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
| 275 PRE_PRE_CookiesClearedOnExit) { | 271 PRE_PRE_CookiesClearedOnExit) { |
| 276 SessionStartupPref::SetStartupPref( | 272 SessionStartupPref::SetStartupPref( |
| 277 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); | 273 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); |
| 278 StoreDataWithPage("cookies.html"); | 274 StoreDataWithPage("cookies.html"); |
| 279 } | 275 } |
| 280 | 276 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 381 |
| 386 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_PostWithPassword) { | 382 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_PostWithPassword) { |
| 387 PostFormWithPage("post_with_password.html", true); | 383 PostFormWithPage("post_with_password.html", true); |
| 388 Restart(); | 384 Restart(); |
| 389 } | 385 } |
| 390 | 386 |
| 391 IN_PROC_BROWSER_TEST_F(RestartTest, PostWithPassword) { | 387 IN_PROC_BROWSER_TEST_F(RestartTest, PostWithPassword) { |
| 392 // The form data contained passwords, so it's removed completely. | 388 // The form data contained passwords, so it's removed completely. |
| 393 CheckFormRestored(false, false); | 389 CheckFormRestored(false, false); |
| 394 } | 390 } |
| OLD | NEW |