summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromedriver
diff options
context:
space:
mode:
authorsamuong <samuong@chromium.org>2015-07-30 10:11:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-30 17:12:08 +0000
commite48735d2a709d55ac6ce93ecae3cf96c461f4bf5 (patch)
treee16454a1a85c997612824002a1cbb4354d6d8d14 /chrome/test/chromedriver
parent955683b3c231ebfd0418f109b87f9e20ed5561fb (diff)
downloadchromium_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-xchrome/test/chromedriver/test/run_py_tests.py7
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'))