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

Unified Diff: chrome/test/chromedriver/client/chromedriver.py

Issue 251933005: [ChromeDriver] Support mobile emulation on desktop Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix implicit bool conversion warning 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
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | chrome/test/chromedriver/client/webelement.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/client/chromedriver.py
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 946f85cbaf883f8455d7adee17b03da10ad3824a..063de9900b0af66972a521b21f6dd3d7b3d50ef3 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -65,7 +65,7 @@ class ChromeDriver(object):
android_use_running_app=None, chrome_switches=None,
chrome_extensions=None, chrome_log_path=None,
debugger_address=None, browser_log_level=None,
- experimental_options=None):
+ mobile_emulation=None, experimental_options=None):
self._executor = command_executor.CommandExecutor(server_url)
options = {}
@@ -89,6 +89,10 @@ class ChromeDriver(object):
assert type(chrome_switches) is list
options['args'] = chrome_switches
+ if mobile_emulation:
+ assert type(mobile_emulation) is dict
+ options['mobileEmulation'] = mobile_emulation
+
if chrome_extensions:
assert type(chrome_extensions) is list
options['extensions'] = chrome_extensions
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | chrome/test/chromedriver/client/webelement.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698