summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib
Commit message (Collapse)AuthorAgeFilesLines
* Fetch a bunch of info from the browsernirnimesh@chromium.org2010-05-251-10/+72
| | | | | | | | | | | | | | This includes info about the browser/renderer/extension/other PIDs, window size. Add a method to set window size. Add tests to verify window size, and verify flash loading. BUG=43234 TEST=python chrome/test/functional/browser.py Review URL: http://codereview.chromium.org/2133013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48192 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for test exclusions for pyauto tests.nirnimesh@chromium.org2010-05-251-18/+73
| | | | | | | | | | | | This makes it easy to exclude tests in PYAUTO_TESTS by prefixing '-'. This can be done in any platform-specific section as well to exclude a test on that platform. Update PYAUTO_TESTS accordingly. Review URL: http://codereview.chromium.org/2161006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48175 0039d316-1c4b-4281-b951-d872f2087c98
* Add new omnibox functional testsnirnimesh@chromium.org2010-05-181-0/+15
| | | | | | | | TEST=python chrome/test/functional/omnibox.py Review URL: http://codereview.chromium.org/2091011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47573 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a pref test -- Win/Linux don't have browser.show_page_options_buttons prefnirnimesh@chromium.org2010-05-181-0/+20
| | | | | | | | TEST=python chrome/test/functional/prefs.py prefs.PrefsTest.testToolbarButtonsPref Review URL: http://codereview.chromium.org/2117009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47481 0039d316-1c4b-4281-b951-d872f2087c98
* Omnibox automation should wait for page load after selecting a popup item.nirnimesh@chromium.org2010-05-171-0/+1
| | | | | | | | TEST=python chrome/test/functional/omnibox.py omnibox.OmniboxTest.testSelect Review URL: http://codereview.chromium.org/2136010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47470 0039d316-1c4b-4281-b951-d872f2087c98
* Add automation hooks for fetching info about omniboxnirnimesh@chromium.org2010-05-142-0/+234
| | | | | | | | | | | | 1. Make the use of browser explicit for each json handler so that handlers that need access to Browser* can have it. Omnibox needs it. 2. Add a simple test TEST=python chrome/test/functional/omnibox.py Review URL: http://codereview.chromium.org/2015010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47311 0039d316-1c4b-4281-b951-d872f2087c98
* Add hooks for fetching basic info from the browser.nirnimesh@chromium.org2010-05-131-0/+30
| | | | | | | | This includes info like version string, executable name, path, and so on. Review URL: http://codereview.chromium.org/2009013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47159 0039d316-1c4b-4281-b951-d872f2087c98
* pyautolib: exposing TabProxy::WaitForTabToBeRestoredace@chromium.org2010-05-101-0/+6
| | | | | | Review URL: http://codereview.chromium.org/2016004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46844 0039d316-1c4b-4281-b951-d872f2087c98
* Add an AddHistoryItem() API to PyAuto with example use.jrg@chromium.org2010-05-071-0/+26
| | | | | | | | | | | Change GetHistory time value from int to float to keep precision. BUG=none TEST=run pyautolib Review URL: http://codereview.chromium.org/2036004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46704 0039d316-1c4b-4281-b951-d872f2087c98
* Add hooks to fetch about:plugins info for PyAuto.nirnimesh@chromium.org2010-05-062-0/+159
| | | | | | | | | Also, hooks for to enable/disable a plugin. Add a test which excercises them. Review URL: http://codereview.chromium.org/1935003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46553 0039d316-1c4b-4281-b951-d872f2087c98
* Add pyauto tests for Navigation.nirnimesh@chromium.org2010-05-053-0/+13
| | | | | | Review URL: http://codereview.chromium.org/1948002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46471 0039d316-1c4b-4281-b951-d872f2087c98
* 1. Fix GetFileURLForPath for windows. GetFileURLForPath() should not quote() ↵nirnimesh@chromium.org2010-05-031-2/+10
| | | | | | | | | | | | ':' in the drive letter on windows. 2. Fix testCrazyFilenames test for win. Expand crazy_filenames.txt to contain i18n filenames as ascii strings. 3. Disable bookmark_bar.testBookmarkBarVisible on win 4. Get rid of using hashlib module in dowload tests. Since we have the files, it doesn't make sense to compute checksum to verify if 2 files are the same -- direct comparison will do. Review URL: http://codereview.chromium.org/1780013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46258 0039d316-1c4b-4281-b951-d872f2087c98
* Add 2 tests for history.nirnimesh@chromium.org2010-04-292-0/+22
| | | | | | | | | | | | | testDownloadNoHistory,testRedirectHistory -- from Deepak. Also, move _DownloadAndWaitForStart (re-used by the new tests) to a common location. TEST=python chrome/test/funtional/history.py Review URL: http://codereview.chromium.org/1702010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45987 0039d316-1c4b-4281-b951-d872f2087c98
* Add automation hooks for setting/gettting preferences.nirnimesh@chromium.org2010-04-293-14/+147
| | | | | | | | | | | | | | | | Add a test which excercises this, update old test. Also, - Remove some old prefs hooks. They were not easy to use and required the user to know what a preference type was, with no way of listing them out. - replace if-else statements for json handlers with a map. - Fix json error strings. json prefers " over ' (automation_provider.cc) BUG=42701 TEST=python chrome/test/functional/prefs.py Review URL: http://codereview.chromium.org/1712019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45956 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests for history.nirnimesh@chromium.org2010-04-262-0/+21
| | | | | | | | | | | | | | | Tests various scenarios with chromium history. testHistoryPersists, testInvalidURLNoHistory -- by Srikanth. testNewTabNoHistory, testIncognitoNoHistory, testStarredBookmarkInHistory, testHistorySearchSnippet -- by Ismail. testNavigateMultiTimes, testMultiTabsWindowsHistory -- by Rohit. TEST=python chrome/test/functional/history.py Review URL: http://codereview.chromium.org/1745012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45597 0039d316-1c4b-4281-b951-d872f2087c98
* Add --repeat flag to PyAuto tests. This is useful for firing off the testsnirnimesh@chromium.org2010-04-231-0/+5
| | | | | | | | many times to determine flakiness. Review URL: http://codereview.chromium.org/1759004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45426 0039d316-1c4b-4281-b951-d872f2087c98
* Add a download test for crazy filenames.nirnimesh@chromium.org2010-04-201-0/+10
| | | | | | | | | | crazy filenames = long/short filenames, special chars, i18n chars. Test written by rohitbm Review URL: http://codereview.chromium.org/1717001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45090 0039d316-1c4b-4281-b951-d872f2087c98
* Add info about starred history items.nirnimesh@chromium.org2010-04-201-3/+5
| | | | | | | | | | | This is the last bit of info we needed from the chrome://history/ page ( the one I forgot to add in the last CL). With this, we can write tests combining history and bookmarks! Review URL: http://codereview.chromium.org/1618032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45086 0039d316-1c4b-4281-b951-d872f2087c98
* Close previous theme info bars when resetting to default themebulach@chromium.org2010-04-203-4/+4
| | | | | | | | | | | | Select and close previous theme info bars when resetting to default theme via the options dialog. As a nice side effect if one tab is showing a theme info bar and the user switches to a different theme in another tab, this change closes the previous theme info bars as well. (landing for satish@chromium.org / http://codereview.chromium.org/1622017/show) BUG=35607 TEST=Install a theme, and with the theme info bar visible open Preferences dialog and click 'reset to default theme' and check the info bar. (full steps given in the above bug entry) Review URL: http://codereview.chromium.org/1650016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45034 0039d316-1c4b-4281-b951-d872f2087c98
* Add automation hooks for fetching history.nirnimesh@chromium.org2010-04-192-0/+103
| | | | | | | | | | | 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
* testFileRenaming: Test file renaming when downloading a already-existing filenirnimesh@chromium.org2010-04-192-0/+50
| | | | | | | | Also, fix download problem when downloading a file. Since we use NavigateToURL() to trigger a download, it might take a while for it to actually start downloading and doing WaitForAllDownloadsToComplete() won't work until downloads actually start. Used WaitUntil for this. (WaitUntil has been reviewed earlier in http://codereview.chromium.org/1541009). Review URL: http://codereview.chromium.org/1575043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44924 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 44885 - Select and close previous theme info bars when resetting to ↵jorlow@chromium.org2010-04-183-4/+4
| | | | | | | | | | | | | | | | | default theme via the options dialog. As a nice side effect if one tab is showing a theme info bar and the user switches to a different theme in another tab, this change closes the previous theme info bars as well. BUG=35607 TEST=Install a theme, and with the theme info bar visible open Preferences dialog and click 'reset to default theme' and check the info bar. (full steps given in the above bug entry) Landing http://codereview.chromium.org/1622017/show for Satish. Review URL: http://codereview.chromium.org/1600030 TBR=jorlow@chromium.org Review URL: http://codereview.chromium.org/1599038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44886 0039d316-1c4b-4281-b951-d872f2087c98
* Select and close previous theme info bars when resetting to default theme ↵jorlow@chromium.org2010-04-183-4/+4
| | | | | | | | | | | | | | via the options dialog. As a nice side effect if one tab is showing a theme info bar and the user switches to a different theme in another tab, this change closes the previous theme info bars as well. BUG=35607 TEST=Install a theme, and with the theme info bar visible open Preferences dialog and click 'reset to default theme' and check the info bar. (full steps given in the above bug entry) Landing http://codereview.chromium.org/1622017/show for Satish. Review URL: http://codereview.chromium.org/1600030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44885 0039d316-1c4b-4281-b951-d872f2087c98
* Add automation hooks to get info about downloads.nirnimesh@chromium.org2010-04-153-1/+105
| | | | | | | | | | | | Makes info about downloads available to pyauto. Also add JSONInterfaceError to represent an error in the json ipc interace. TEST=None BUG=None Review URL: http://codereview.chromium.org/1637008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44664 0039d316-1c4b-4281-b951-d872f2087c98
* Fix dependencies for pyauto.nirnimesh@chromium.org2010-04-131-0/+3
| | | | | | | | The swig action should depend on the headers it includes. Review URL: http://codereview.chromium.org/1646002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44305 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for basic extension automation through the Automation Proxy.kkania@chromium.org2010-04-061-3/+4
| | | | | | | | BUG=36171 TEST=none Review URL: http://codereview.chromium.org/1048002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43730 0039d316-1c4b-4281-b951-d872f2087c98
* Add generic "json dict" entry point for pyauto commands. Will preventjrg@chromium.org2010-04-024-1/+34
| | | | | | | | | | | | | | | | the need to modify the automation proxy anymore. New pyauto commands will only need to edit pyauto.py (to add a new SendJSONCommand() call) and browser_proxy.cc (to implement the other side). Contrast with the normal editing of ~8 files. Also added WaitForAllDownloadsToComplete using new JSON path. BUG=http://crbug.com/39274 Review URL: http://codereview.chromium.org/1547012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43436 0039d316-1c4b-4281-b951-d872f2087c98
* Expose BrowserProxy and TabProxy methods directly to PyAutonirnimesh@chromium.org2010-03-296-29/+157
| | | | | | | | | | | | | - Swig scoped_refptr so as to make BrowserProxy and TabProxy objects directly visible and callable, although the use of scoped_refptr is transparent to pyauto user - Fix a crash in BookmarkModel.FindByID() while operating on leaf nodes - Expose methods to set preferences - Expose methods to handle http auth prompts - Add a pyauto test to verify the restore-on-start preference - Fix path so that pydoc continues to work on pyauto.py Review URL: http://codereview.chromium.org/1536001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42990 0039d316-1c4b-4281-b951-d872f2087c98
* Add a few PyAuto tests for bookmarks.nirnimesh@chromium.org2010-03-241-0/+5
| | | | | | | | | | | | | | | The first two tests are from rohitbm and the rest from krisrs. testUnicodeStrings -- test bookmarks with unicode strings testSizes -- test bookmarks with different sized strings testAddingBookmarksToBarAndOther - add bookmarks to diff locations testAddingFoldersToBarAndOther -- add bookmark groups to diff locations testAddingFoldersWithChildrenToBarAndOther -- add bookmarks and groups to different locations Review URL: http://codereview.chromium.org/1191002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42417 0039d316-1c4b-4281-b951-d872f2087c98
* Fix PyAuto crash when a script has multiple tests.nirnimesh@chromium.org2010-03-236-73/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL better maps C++ UITestSuite to python suite and C++ UITestBase to python testcase. All one-time initializations go in the suite while testcases are re-entrant now -- this is what fixes the crash. Also: - Cmdline flags to pyauto script (verbose, wait for attaching to debugger) - Establish the setup of sys.path, so that it's setup correctly and tests don't have to worry about it - Create facitlites for PYAUTO_TESTS files inside script dirs (say chrome/test/functional) which defines the tests to run. - Restructure such that pyauto scripts can be run standalone as well as using the pyauto.py script (like unittest.py). For example, a test could be fired in any of the below ways: # Run tests in a module ('bookmarks') python pyauto_functional.py bookmarks # Run tests in a test case ('bookmarks.BookmarksTest') python pyauto_functional.py bookmarks.BookmarksTest # Run a test ('bookmarks.BookmarksTest.testBasics') python pyauto_functional.py bookmarks.BookmarksTest.testBasics # Run directly from the test script python bookmarks.py python bookmarks.py bookmarks python bookmarks.py bookmarks.BookmarksTest python bookmarks.py bookmarks.BookmarksTest.testBasics BUG=32292 TEST=python chrome/test/functional/bookmarks.py Review URL: http://codereview.chromium.org/1126003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42350 0039d316-1c4b-4281-b951-d872f2087c98
* PyAuto: Flags to forbid cleaning profile dirnirnimesh@chromium.org2010-03-174-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Several tests require quitting/killing chromium to test features like restore. In addition, one might want to use pyauto on an existing profile. This CL lets pyauto work without cleaning the profile dir. Also lets specify the homepage to use. Example: Running this test with CHROME_UI_TESTS_USER_DATA_DIR pointing to a profile dir will run my script with the given dir as the user-data-dir without cleaning it up, and also specifies the homepage to use. class A(PyUITest): def __init__(self, methodName): PyUITest.__init__(self, methodName, clear_profile=False, homepage="http://www.cnn.com") def testA(self): pass BUG=None TEST=None Review URL: http://codereview.chromium.org/1007007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41878 0039d316-1c4b-4281-b951-d872f2087c98
* Add pyauto hooks for bookmarks.jrg@chromium.org2010-03-125-0/+247
| | | | | | | | | | Get model, add/remove, add folder, reparent, change title/url. BUG=34492 Review URL: http://codereview.chromium.org/792003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41450 0039d316-1c4b-4281-b951-d872f2087c98
* Allow pyauto to provide extra flags to be passed when launching chromenirnimesh@chromium.org2010-03-101-2/+18
| | | | | | | | | | | | | | | | | | | | | With this, a test can provide additional flags to pass to chrome, for example to specify the proxy server to use, as in the example below: class ArgsTest(PyUITest): def __init__(self, methodName): PyUITest.__init__(self, methodName, extra_chrome_flags="--proxy-server=PROXY_SERVER:PORT") def testProxy(self): self.NavigateToURL("http://www.google.com") TEST=None BUG=None Review URL: http://codereview.chromium.org/805001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41195 0039d316-1c4b-4281-b951-d872f2087c98
* Provide a method to specify to the automation interface the dir containing ↵nirnimesh@chromium.org2010-03-094-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | browser binaries Problem: The automation proxy interface kinda assumes that the running binary would reside in the same directory as the browser binaries -- ie in Debug/Release dirs. While this works for all C++ binaries like ui_tests, startup_tests, this fails for pyauto tests since the running binary in this case is /usr/bin/python (or some such system path). This changeset lets pyauto explicitly specify the automation interface the dir in which to look for chromium binaries. Also, expose RunCommand method to pyauto. BUG=37730 TEST=pyauto scripts should work without having to copy python to Debug/Release dirs Review URL: http://codereview.chromium.org/695001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41051 0039d316-1c4b-4281-b951-d872f2087c98
* - Update README.chromium to mention change to swig libs in third_partynirnimesh@chromium.org2010-03-093-6/+6
| | | | | | | | | | | | | | - Provide platform-specific macros to swig. - Update DEPS to use right swig updates To be committed _after_ accompanying CL: http://codereview.chromium.org/661334 BUG=32285 TEST=None Review URL: http://codereview.chromium.org/661342 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41048 0039d316-1c4b-4281-b951-d872f2087c98
* Was already a 'wait for animation to complete'.jrg@chromium.org2010-03-063-0/+26
| | | | | | | | Added py interface to it. Review URL: http://codereview.chromium.org/668204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40812 0039d316-1c4b-4281-b951-d872f2087c98
* Add some bookmark bar hooks for pyauto.jrg@chromium.org2010-03-053-0/+25
| | | | | | | | | | | Refactor the implementation for x-platform happiness. Add simple pyauto script that uses it (but needs http://crbug.com32292 fixed before it works without tweaking). Review URL: http://codereview.chromium.org/670001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40782 0039d316-1c4b-4281-b951-d872f2087c98
* PyAuto: Fix some methods that assume that they're working on the first window.nirnimesh@chromium.org2010-02-233-58/+105
| | | | | | | | | | - Provide args to specifiy tab_index or window_index. - Re-order the methods to group by functionality, rather than from where they are implemented. Review URL: http://codereview.chromium.org/650106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39745 0039d316-1c4b-4281-b951-d872f2087c98
* Revert a false commit (r39622)nirnimesh@google.com2010-02-221-12/+0
| | | | | | | TBR=rafaelw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39625 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 39618nirnimesh@google.com2010-02-221-0/+12
| | | | | | | TBR=rafaelw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39622 0039d316-1c4b-4281-b951-d872f2087c98
* Expose more functionality to pyautonirnimesh@chromium.org2010-02-183-3/+65
| | | | | | | | | | | | Additions include some low-hanging fruits: - create tabs - activate a tab by index - apply any accelerator (like IDC_BACK, IDC_REFRESH) - install and load an extension Review URL: http://codereview.chromium.org/647006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39394 0039d316-1c4b-4281-b951-d872f2087c98
* Expose additional methods to pyauto.nirnimesh@chromium.org2010-02-184-14/+94
| | | | | | | | | | | | | | | | Also, - add python documentation strings which get embedded in the generated python classes (BUG 32287). - Make utility methods public in ui_test.h - BUG=32287 TEST=None Review URL: http://codereview.chromium.org/633004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39326 0039d316-1c4b-4281-b951-d872f2087c98
* Build pyauto for Linux.nirnimesh@chromium.org2010-02-021-7/+13
| | | | | | | | | | | | Since we build a shared library (for swig), we should attempt to build pyauto only when linux_fpic==1. Also, 'product_prefix' options with gyp (instead of platform-specifc ones) to get the right filename for the output shared lib. BUG=32285 TEST=linux builders should remain happy Review URL: http://codereview.chromium.org/568007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37867 0039d316-1c4b-4281-b951-d872f2087c98
* PyAuto: Python Interface to Chromium's Automation Proxy.nirnimesh@chromium.org2010-01-214-0/+265
PyAuto is a python interface to chromium's automation framework. It exposes some of the Automation Proxy functions in Python. This can be used to play around with chromium, or automate functional tests. SWIG is used to bridge Automation Proxy's C++ to Python. This CL addresses Mac-only to begin with. I'll be adding win/linux shortly. Also, this CL breaks down UITest class into parts that does not use gtest (UITestBase) and parts that does (UITest). UITestBase is used by pyauto. BUG=32283 TEST=None Review URL: http://codereview.chromium.org/555022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36808 0039d316-1c4b-4281-b951-d872f2087c98