summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromedriver
diff options
context:
space:
mode:
authorcraigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 02:06:41 +0000
committercraigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 02:06:41 +0000
commit23a1e3dda52ae121cdc202f2fa20c3becbfb4b49 (patch)
treecb52273151104b0e34f46f979e1a6804661eb298 /chrome/test/chromedriver
parentbfdafd25a75110848cc7577d8c7960707b5e6cc3 (diff)
downloadchromium_src-23a1e3dda52ae121cdc202f2fa20c3becbfb4b49.zip
chromium_src-23a1e3dda52ae121cdc202f2fa20c3becbfb4b49.tar.gz
chromium_src-23a1e3dda52ae121cdc202f2fa20c3becbfb4b49.tar.bz2
[ChromeDriver] Fix python tests that broke with the switch from about:blank to data:
BUG=None TEST=chrome/test/chromedriver/run_py_tests.py Review URL: https://chromiumcodereview.appspot.com/12090037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromedriver')
-rw-r--r--chrome/test/chromedriver/chrome_launcher_impl.cc4
-rw-r--r--chrome/test/chromedriver/frame_tracker.cc2
-rw-r--r--chrome/test/chromedriver/frame_tracker.h2
-rwxr-xr-xchrome/test/chromedriver/run_py_tests.py2
4 files changed, 4 insertions, 6 deletions
diff --git a/chrome/test/chromedriver/chrome_launcher_impl.cc b/chrome/test/chromedriver/chrome_launcher_impl.cc
index 92e13e0..4b4485f 100644
--- a/chrome/test/chromedriver/chrome_launcher_impl.cc
+++ b/chrome/test/chromedriver/chrome_launcher_impl.cc
@@ -46,9 +46,7 @@ Status ChromeLauncherImpl::Launch(
if (!user_data_dir.CreateUniqueTempDir())
return Status(kUnknownError, "cannot create temp dir for user data dir");
command.AppendSwitchPath("user-data-dir", user_data_dir.path());
- command.AppendArg(
- base::StringPrintf("data:text/html;charset=utf-8,ChromeDriver v%s",
- kChromeDriverVersion));
+ command.AppendArg("data:text/html;charset=utf-8,");
base::LaunchOptions options;
base::ProcessHandle process;
diff --git a/chrome/test/chromedriver/frame_tracker.cc b/chrome/test/chromedriver/frame_tracker.cc
index d2cb255..e3354be 100644
--- a/chrome/test/chromedriver/frame_tracker.cc
+++ b/chrome/test/chromedriver/frame_tracker.cc
@@ -16,7 +16,7 @@ FrameTracker::FrameTracker() {}
FrameTracker::~FrameTracker() {}
Status FrameTracker::GetFrameForContextId(
- const int context_id, std::string* frame_id) {
+ int context_id, std::string* frame_id) {
if (context_to_frame_map_.count(context_id) == 0)
return Status(kUnknownError, "execution context does not have a frame");
*frame_id = context_to_frame_map_[context_id];
diff --git a/chrome/test/chromedriver/frame_tracker.h b/chrome/test/chromedriver/frame_tracker.h
index 12666d4..885263a 100644
--- a/chrome/test/chromedriver/frame_tracker.h
+++ b/chrome/test/chromedriver/frame_tracker.h
@@ -25,7 +25,7 @@ class FrameTracker : public DevToolsEventListener {
FrameTracker();
virtual ~FrameTracker();
- Status GetFrameForContextId(const int context_id, std::string* frame_id);
+ Status GetFrameForContextId(int context_id, std::string* frame_id);
Status GetContextIdForFrame(const std::string& frame_id, int* context_id);
// Overridden from DevToolsEventListener:
diff --git a/chrome/test/chromedriver/run_py_tests.py b/chrome/test/chromedriver/run_py_tests.py
index 442e8e4..709354b 100755
--- a/chrome/test/chromedriver/run_py_tests.py
+++ b/chrome/test/chromedriver/run_py_tests.py
@@ -156,7 +156,7 @@ class ChromeDriverTest(unittest.TestCase):
self.assertEquals(1, len(self._driver.FindElements('tag name', 'br')))
def testGetCurrentUrl(self):
- self.assertEqual('about:blank', self._driver.GetCurrentUrl())
+ self.assertTrue('data:' in self._driver.GetCurrentUrl())
def testGoBackAndGoForward(self):
self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html'))