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"; | |
262 } | 261 } |
263 | 262 |
264 // Flaky on Linux: http://crbug.com/163096 | 263 // 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 |
265 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 269 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
266 LocalStorageClearedOnExit) { | 270 MAYBE_LocalStorageClearedOnExit) { |
267 CheckReloadedPageNotRestored(); | 271 CheckReloadedPageNotRestored(); |
268 } | 272 } |
269 | 273 |
270 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, | 274 IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, |
271 PRE_PRE_CookiesClearedOnExit) { | 275 PRE_PRE_CookiesClearedOnExit) { |
272 SessionStartupPref::SetStartupPref( | 276 SessionStartupPref::SetStartupPref( |
273 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); | 277 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); |
274 StoreDataWithPage("cookies.html"); | 278 StoreDataWithPage("cookies.html"); |
275 } | 279 } |
276 | 280 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 385 |
382 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_PostWithPassword) { | 386 IN_PROC_BROWSER_TEST_F(RestartTest, PRE_PostWithPassword) { |
383 PostFormWithPage("post_with_password.html", true); | 387 PostFormWithPage("post_with_password.html", true); |
384 Restart(); | 388 Restart(); |
385 } | 389 } |
386 | 390 |
387 IN_PROC_BROWSER_TEST_F(RestartTest, PostWithPassword) { | 391 IN_PROC_BROWSER_TEST_F(RestartTest, PostWithPassword) { |
388 // The form data contained passwords, so it's removed completely. | 392 // The form data contained passwords, so it's removed completely. |
389 CheckFormRestored(false, false); | 393 CheckFormRestored(false, false); |
390 } | 394 } |
OLD | NEW |