summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional
diff options
context:
space:
mode:
authoralyssad@chromium.org <alyssad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 20:36:41 +0000
committeralyssad@chromium.org <alyssad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 20:36:41 +0000
commit731b4677ab26acf1f6813f5320ef0bec38d325b6 (patch)
tree789ec6c8bb9d2e618a94cdd7fa299b6bf39ba7c6 /chrome/test/functional
parentb5e5774975c5291cff7dc3df1c2f482d2a10b389 (diff)
downloadchromium_src-731b4677ab26acf1f6813f5320ef0bec38d325b6.zip
chromium_src-731b4677ab26acf1f6813f5320ef0bec38d325b6.tar.gz
chromium_src-731b4677ab26acf1f6813f5320ef0bec38d325b6.tar.bz2
Expose cookie get/set to pyauto
Review URL: http://codereview.chromium.org/2903008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rw-r--r--chrome/test/functional/PYAUTO_TESTS1
-rw-r--r--chrome/test/functional/cookies.py25
2 files changed, 26 insertions, 0 deletions
diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS
index 5029b06..afb3885 100644
--- a/chrome/test/functional/PYAUTO_TESTS
+++ b/chrome/test/functional/PYAUTO_TESTS
@@ -28,6 +28,7 @@
'browsing_data',
'codesign',
'content',
+ 'cookies',
'downloads',
'history',
'navigation',
diff --git a/chrome/test/functional/cookies.py b/chrome/test/functional/cookies.py
new file mode 100644
index 0000000..5a3a60b
--- /dev/null
+++ b/chrome/test/functional/cookies.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+import pyauto_functional # Must be imported before pyauto
+import pyauto
+
+
+class CookiesTest(pyauto.PyUITest):
+ """Tests for Cookies."""
+
+ def testCookies(self):
+ """Test setting cookies and getting the value."""
+ cookie_url = pyauto.GURL(self.GetFileURLForPath(
+ os.path.join(self.DataDir(), 'title1.html')))
+ cookie_val = 'foo=bar'
+ self.SetCookie(cookie_url, cookie_val)
+ self.assertEqual(cookie_val, self.GetCookie(cookie_url))
+
+
+if __name__ == '__main__':
+ pyauto_functional.Main()