summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-25 01:18:19 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-25 01:18:19 +0000
commit9026be28261f05ff7f77b2e7c16e96d7b942bfbf (patch)
tree7d2e14bb86e42410181065cda6c69a333467934c
parentd21d35715a28ae4e1d59f2136addf3a764d29bb2 (diff)
downloadchromium_src-9026be28261f05ff7f77b2e7c16e96d7b942bfbf.zip
chromium_src-9026be28261f05ff7f77b2e7c16e96d7b942bfbf.tar.gz
chromium_src-9026be28261f05ff7f77b2e7c16e96d7b942bfbf.tar.bz2
Fix imports tests on win.
Need to pass abs path to .zip file Review URL: http://codereview.chromium.org/5385001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67364 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/functional/imports.py14
-rw-r--r--chrome/test/pyautolib/pyauto.py3
2 files changed, 9 insertions, 8 deletions
diff --git a/chrome/test/functional/imports.py b/chrome/test/functional/imports.py
index 3c38113..091489a 100644
--- a/chrome/test/functional/imports.py
+++ b/chrome/test/functional/imports.py
@@ -42,8 +42,8 @@ class ImportsTest(pyauto.PyUITest):
if pyauto.PyUITest.IsMac():
self._firefox_profiles_path = os.path.join(
os.environ['HOME'], 'Library','Application Support','Firefox')
- self._firefox_test_profile = os.path.join(
- pyauto.PyUITest.DataDir(), 'import', 'firefox', 'macwin.zip')
+ self._firefox_test_profile = os.path.abspath(os.path.join(
+ pyauto.PyUITest.DataDir(), 'import', 'firefox', 'macwin.zip'))
self._safari_profiles_path = os.path.join(
os.environ['HOME'], 'Library', 'Safari')
# Don't import passwords to avoid Keychain popups. See crbug.com/49378.
@@ -51,13 +51,13 @@ class ImportsTest(pyauto.PyUITest):
elif pyauto.PyUITest.IsWin():
self._firefox_profiles_path = os.path.join(
os.getenv('APPDATA'), 'Mozilla', 'Firefox')
- self._firefox_test_profile = os.path.join(
- pyauto.PyUITest.DataDir(), 'import', 'firefox', 'macwin.zip')
- else:
+ self._firefox_test_profile = os.path.abspath(os.path.join(
+ pyauto.PyUITest.DataDir(), 'import', 'firefox', 'macwin.zip'))
+ else: # Linux
self._firefox_profiles_path = os.path.join(
os.environ['HOME'], '.mozilla', 'firefox')
- self._firefox_test_profile = os.path.join(
- pyauto.PyUITest.DataDir(), 'import', 'firefox', 'linux.zip')
+ self._firefox_test_profile = os.path.abspath(os.path.join(
+ pyauto.PyUITest.DataDir(), 'import', 'firefox', 'linux.zip'))
# Expected items for tests.
self._history_items = ['Google', 'Google News', u'Google \ub3c4\uc11c']
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index f09bcd9..054e51e 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -169,7 +169,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
@staticmethod
def DataDir():
"""Returns the path to the data dir chrome/test/data."""
- return os.path.join(os.path.dirname(__file__), os.pardir, "data")
+ return os.path.normpath(
+ os.path.join(os.path.dirname(__file__), os.pardir, "data"))
@staticmethod
def GetFileURLForPath(path):