diff options
author | samuong <samuong@chromium.org> | 2015-07-30 10:11:38 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-30 17:12:08 +0000 |
commit | e48735d2a709d55ac6ce93ecae3cf96c461f4bf5 (patch) | |
tree | e16454a1a85c997612824002a1cbb4354d6d8d14 /chrome/test/chromedriver | |
parent | 955683b3c231ebfd0418f109b87f9e20ed5561fb (diff) | |
download | chromium_src-e48735d2a709d55ac6ce93ecae3cf96c461f4bf5.zip chromium_src-e48735d2a709d55ac6ce93ecae3cf96c461f4bf5.tar.gz chromium_src-e48735d2a709d55ac6ce93ecae3cf96c461f4bf5.tar.bz2 |
[chromedriver] Fix broken testGetCurrentUrl test.
On Android, this test doesn't always run in a new session, so the current URL
isn't guaranteed to be "data:,".
BUG=
TBR=stgao@chromium.org
Review URL: https://codereview.chromium.org/1270583002
Cr-Commit-Position: refs/heads/master@{#341139}
Diffstat (limited to 'chrome/test/chromedriver')
-rwxr-xr-x | chrome/test/chromedriver/test/run_py_tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py index d8301d6..fe0ccbc 100755 --- a/chrome/test/chromedriver/test/run_py_tests.py +++ b/chrome/test/chromedriver/test/run_py_tests.py @@ -10,6 +10,7 @@ import json import math import optparse import os +import shutil import socket import subprocess import sys @@ -18,7 +19,7 @@ import threading import time import unittest import urllib2 -import shutil +import uuid _THIS_DIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(1, os.path.join(_THIS_DIR, os.pardir)) @@ -529,7 +530,9 @@ class ChromeDriverTest(ChromeDriverBaseTest): self.assertEquals('0123456789+-*/ Hi, there!', value) def testGetCurrentUrl(self): - self.assertEquals('data:,', self._driver.GetCurrentUrl()) + url = 'data:,%s' % uuid.uuid4() + self._driver.Load(url) + self.assertEquals(url, self._driver.GetCurrentUrl()) def testGoBackAndGoForward(self): self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html')) |