summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:22:41 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:22:41 +0000
commit378b4516b5e7970ae1011599ed397b3d03010c7a (patch)
tree9a493d1ba504909d4d178224114ea3a9f05d85fa /chrome/test/automation
parent9b8a1a9b4de300fdc975f2454e8b71f40ab34705 (diff)
downloadchromium_src-378b4516b5e7970ae1011599ed397b3d03010c7a.zip
chromium_src-378b4516b5e7970ae1011599ed397b3d03010c7a.tar.gz
chromium_src-378b4516b5e7970ae1011599ed397b3d03010c7a.tar.bz2
[chromedriver] Fix capability 'loadAsync' to work with chrome>=23.
There was a change in r150434 which made TestingAutomationProvider::NavigateToURL return without a 'result' parameter when the navigation_count == 0. We could change the TestingAutomationProvider to send the result parameter in this case (like it used to), but it makes sense in that we don't really know the result of the navigation if it's asynchronous. BUG=chromedriver:179 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11865012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_json_requests.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_json_requests.cc b/chrome/test/automation/automation_json_requests.cc
index 864a4dd..efdc440 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -269,6 +269,9 @@ bool SendNavigateToURLJSONRequest(
DictionaryValue reply_dict;
if (!SendAutomationJSONRequest(sender, dict, &reply_dict, error))
return false;
+ // We don't expect a navigation result for asynchronous navigations.
+ if (navigation_count == 0)
+ return true;
int response = 0;
if (!reply_dict.GetInteger("result", &response))
return false;