Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: chrome/test/chromedriver/session_commands.cc

Issue 2125123002: [chromedriver] Add page loading strategy to capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge conflicts Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/session_commands.cc
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index 48ad77d7f1c7bddb310ff719df20b306b89bc8b0..c9e9de7b2d179d435b0855220a1a5218ab835c72 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -97,6 +97,7 @@ std::unique_ptr<base::DictionaryValue> CreateCapabilities(Chrome* chrome) {
caps->SetString("version", chrome->GetBrowserInfo()->browser_version);
caps->SetString("chrome.chromedriverVersion", kChromeDriverVersion);
caps->SetString("platform", chrome->GetOperatingSystemName());
+ caps->SetString("pageLoadingStrategy", chrome->GetPageLoadingStrategy());
caps->SetBoolean("javascriptEnabled", true);
caps->SetBoolean("takesScreenshot", true);
caps->SetBoolean("takesHeapSnapshot", true);
@@ -187,7 +188,6 @@ Status InitSessionHelper(const InitSessionParams& bound_params,
// |session| will own the |CommandListener|s.
session->command_listeners.swap(command_listeners);
-
samuong 2016/07/25 22:44:33 nit: don't delete the blank line
evajiang 2016/07/28 17:15:04 Done.
status = LaunchChrome(bound_params.context_getter.get(),
bound_params.socket_factory,
bound_params.device_manager,
@@ -199,6 +199,10 @@ Status InitSessionHelper(const InitSessionParams& bound_params,
if (status.IsError())
return status;
+ status = session->chrome->SetPageLoadingStrategy(capabilities.page_loading);
+ if (status.IsError())
+ return status;
+
std::list<std::string> web_view_ids;
status = session->chrome->GetWebViewIds(&web_view_ids);
if (status.IsError() || web_view_ids.empty()) {

Powered by Google App Engine
This is Rietveld 408576698