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

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

Issue 288193004: [Chromedriver] Add Device Metrics override support to ChromeDriver via Capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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_desktop_impl.cc
diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
index 8cdd130114b43668f60e315487e0c682c3a70c4a..d7372499fec755d9fc3954f5cbda52c6982e65c1 100644
--- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
@@ -117,7 +117,8 @@ Status ChromeDesktopImpl::WaitForPageToLoad(const std::string& url,
scoped_ptr<WebView> web_view_tmp(
new WebViewImpl(id,
devtools_http_client_->browser_info(),
- devtools_http_client_->CreateClient(id)));
+ devtools_http_client_->CreateClient(id),
+ devtools_http_client_->device_metrics()));
Status status = web_view_tmp->ConnectIfNecessary();
if (status.IsError())
return status;
@@ -155,6 +156,10 @@ std::string ChromeDesktopImpl::GetOperatingSystemName() {
return base::SysInfo::OperatingSystemName();
}
+bool ChromeDesktopImpl::IsMobileEmulationEnabled() const {
+ return devtools_http_client_->device_metrics() != NULL;
+}
+
Status ChromeDesktopImpl::QuitImpl() {
if (!KillProcess(process_))
return Status(kUnknownError, "cannot kill Chrome");

Powered by Google App Engine
This is Rietveld 408576698