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

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

Issue 663343003: [chromedriver] Fix tests with viewport; force touch emulation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing commetns Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
diff --git a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
index 6b31d9ecdace7ff1d331beb36789d775d0d9723d..793f8341eaed69d217fc2068e5ccbf84e87dd782 100644
--- a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
+++ b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
@@ -67,5 +67,13 @@ Status MobileEmulationOverrideManager::ApplyOverrideIfNeeded() {
overridden_device_metrics_->text_autosizing);
params.SetDouble("fontScaleFactor",
overridden_device_metrics_->font_scale_factor);
- return client_->SendCommand("Page.setDeviceMetricsOverride", params);
+ Status status = client_->SendCommand("Page.setDeviceMetricsOverride", params);
+ if (status.IsError())
+ return status;
+
+ // Always emulate touch.
+ base::DictionaryValue emulate_touch_params;
+ emulate_touch_params.SetBoolean("enabled", true);
+ return client_->SendCommand(
+ "Page.setTouchEmulationEnabled", emulate_touch_params);
}
« no previous file with comments | « no previous file | chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698