summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib/bookmark_model.py
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 17:14:01 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 17:14:01 +0000
commit3f82de6e5ce07ebdb8490fb9cbffb6a0a02ae7a7 (patch)
tree08ed6e47882065879d99624c01348fa8f7f046e4 /chrome/test/pyautolib/bookmark_model.py
parentf9204f0406b921905380f7e385bfdd41fb23a401 (diff)
downloadchromium_src-3f82de6e5ce07ebdb8490fb9cbffb6a0a02ae7a7.zip
chromium_src-3f82de6e5ce07ebdb8490fb9cbffb6a0a02ae7a7.tar.gz
chromium_src-3f82de6e5ce07ebdb8490fb9cbffb6a0a02ae7a7.tar.bz2
Fix PyAuto crash when a script has multiple tests.
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
Diffstat (limited to 'chrome/test/pyautolib/bookmark_model.py')
-rw-r--r--chrome/test/pyautolib/bookmark_model.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/chrome/test/pyautolib/bookmark_model.py b/chrome/test/pyautolib/bookmark_model.py
index cc43f73..e201ccf 100644
--- a/chrome/test/pyautolib/bookmark_model.py
+++ b/chrome/test/pyautolib/bookmark_model.py
@@ -9,13 +9,9 @@
Obtain one of these from PyUITestSuite::GetBookmarkModel() call.
"""
-# TODO(jrg): establish a standard path for pyauto tests.
-# This "adjustment" assumes we live in "src/chrome/test/pyautolib".
import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
-
import simplejson as json
+import sys
class BookmarkModel(object):