diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 21:41:36 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 21:41:36 +0000 |
commit | e6e376e2851b35b5ee58935c100452379ce0c1ae (patch) | |
tree | d9171a564b5eaf62c0436b21828397b504e68485 /chrome/test/functional | |
parent | aaeaa620cf80c5d07560c1fc173dc13e38db9aee (diff) | |
download | chromium_src-e6e376e2851b35b5ee58935c100452379ce0c1ae.zip chromium_src-e6e376e2851b35b5ee58935c100452379ce0c1ae.tar.gz chromium_src-e6e376e2851b35b5ee58935c100452379ce0c1ae.tar.bz2 |
Add automation hooks for fetching history.
Adding a test which exercises the GetHistoryInfo() hooks.
BUG=39275
TEST=python chrome/test/functional/history.py
Review URL: http://codereview.chromium.org/1648015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rw-r--r-- | chrome/test/functional/history.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/test/functional/history.py b/chrome/test/functional/history.py new file mode 100644 index 0000000..2fab6b5 --- /dev/null +++ b/chrome/test/functional/history.py @@ -0,0 +1,38 @@ +#!/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 pyauto_functional # Must be imported before pyauto +import pyauto + + +class HistoryTest(pyauto.PyUITest): + """TestCase for History.""" + + def testBasic(self): + url = 'http://www.google.com/' + title = 'Google' + self.NavigateToURL(url) + + history = self.GetHistoryInfo().History() + self.assertEqual(1, len(history)) + self.assertEqual(title, history[0]['title']) + self.assertEqual(url, history[0]['url']) + + def Debug(self): + """Test method for experimentation. + + This method will not run automatically. + """ + while True: + raw_input('Interact with the browser and hit <enter> to dump history.. ') + print '*' * 20 + history = self.GetHistoryInfo().History() + import pprint + pp = pprint.PrettyPrinter(indent=2) + pp.pprint(history) + + +if __name__ == '__main__': + pyauto_functional.Main() |