Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Side by Side Diff: chrome/test/functional/cookies.py

Issue 10407124: Don't force non-session only cookies to be session only cookies, instead delete on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import logging 7 import logging
8 8
9 import pyauto_functional # Must be imported before pyauto 9 import pyauto_functional # Must be imported before pyauto
10 import pyauto 10 import pyauto
11 11
12 12
13 class CookiesTest(pyauto.PyUITest): 13 class CookiesTest(pyauto.PyUITest):
14 """Tests for Cookies.""" 14 """Tests for Cookies."""
15 15
16 def __init__(self, methodName='runTest'): 16 def __init__(self, methodName='runTest'):
17 super(CookiesTest, self).__init__(methodName) 17 super(CookiesTest, self).__init__(methodName)
18 self.test_host = os.environ.get('COOKIES_TEST_HOST', 'www.google.com') 18 self.test_host = os.environ.get('COOKIES_TEST_HOST', 'google.com')
19 19
20 def setUp(self): 20 def setUp(self):
21 pyauto.PyUITest.setUp(self); 21 pyauto.PyUITest.setUp(self);
22 # Set the startup preference to "open the new tab page", if the startup 22 # Set the startup preference to "open the new tab page", if the startup
23 # preference is "continue where I left off", session cookies will be saved. 23 # preference is "continue where I left off", session cookies will be saved.
24 self.SetPrefs(pyauto.kRestoreOnStartup, 5); 24 self.SetPrefs(pyauto.kRestoreOnStartup, 5);
25 25
26 def _CookieCheckIncognitoWindow(self, url, cookies_enabled=True): 26 def _CookieCheckIncognitoWindow(self, url, cookies_enabled=True):
27 """Check the cookie for the given URL in an incognito window.""" 27 """Check the cookie for the given URL in an incognito window."""
28 # Navigate to the URL in an incognito window and verify no cookie is set. 28 # Navigate to the URL in an incognito window and verify no cookie is set.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 # Restart the browser to check that the cookie doesn't persist. 241 # Restart the browser to check that the cookie doesn't persist.
242 # (This fails on ChromeOS because kRestoreOnStartup is ignored and 242 # (This fails on ChromeOS because kRestoreOnStartup is ignored and
243 # the startup preference is always "continue where I left off.") 243 # the startup preference is always "continue where I left off.")
244 if not self.IsChromeOS(): 244 if not self.IsChromeOS():
245 self.RestartBrowser(clear_profile=False) 245 self.RestartBrowser(clear_profile=False)
246 self.assertFalse(self.GetCookie(pyauto.GURL(http_url)), 246 self.assertFalse(self.GetCookie(pyauto.GURL(http_url)),
247 msg='Cookie persisted after restarting session.') 247 msg='Cookie persisted after restarting session.')
248 248
249 if __name__ == '__main__': 249 if __name__ == '__main__':
250 pyauto_functional.Main() 250 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698