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

Unified Diff: chrome/test/chromedriver/chrome/chrome_impl.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/chrome/chrome_impl.cc
diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc
index 28c7728e6a247e3156ea835ad5cfd43c2a3fc1e3..afd6ef550f43eb36144876f8648c78a0ada68c92 100644
--- a/chrome/test/chromedriver/chrome/chrome_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
@@ -78,7 +78,7 @@ Status ChromeImpl::GetWebViewIds(std::list<std::string>* web_view_ids) {
}
web_views_.push_back(make_linked_ptr(new WebViewImpl(
view.id, devtools_http_client_->browser_info(), std::move(client),
- devtools_http_client_->device_metrics())));
+ devtools_http_client_->device_metrics(), page_loading_strategy_)));
}
}
}
@@ -129,6 +129,18 @@ bool ChromeImpl::HasTouchScreen() const {
return false;
}
+std::string ChromeImpl::GetPageLoadingStrategy() const {
+ return page_loading_strategy_;
+}
+
+Status ChromeImpl::SetPageLoadingStrategy(std::string strategy) {
+ if (strategy == "none" || strategy == "normal")
+ page_loading_strategy_ = strategy;
+ else
+ return Status(kUnknownError, "unsupported load strategy");
+ return Status(kOk);
+}
+
Status ChromeImpl::Quit() {
Status status = QuitImpl();
if (status.IsOk())
@@ -144,6 +156,7 @@ ChromeImpl::ChromeImpl(
: quit_(false),
devtools_http_client_(std::move(http_client)),
devtools_websocket_client_(std::move(websocket_client)),
+ page_loading_strategy_("normal"),
port_reservation_(std::move(port_reservation)) {
devtools_event_listeners_.swap(devtools_event_listeners);
}

Powered by Google App Engine
This is Rietveld 408576698