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

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

Issue 2785083002: Use devtools to set user agent in chromedriver (Closed)
Patch Set: Fix New Tab test Created 3 years, 8 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/capabilities.h ('k') | chrome/test/chromedriver/capabilities_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/capabilities.cc
diff --git a/chrome/test/chromedriver/capabilities.cc b/chrome/test/chromedriver/capabilities.cc
index 240318bf0702dcaeef7764405dee8df676876cb2..bc2502a913717fcf2f504e38f019a2abc1ea2698 100644
--- a/chrome/test/chromedriver/capabilities.cc
+++ b/chrome/test/chromedriver/capabilities.cc
@@ -114,7 +114,7 @@ Status ParseDeviceName(const std::string& device_name,
capabilities->device_metrics.reset(device->device_metrics.release());
// Don't override the user agent if blank (like for notebooks).
if (!device->user_agent.empty())
- capabilities->switches.SetSwitch("user-agent", device->user_agent);
+ capabilities->user_agent = device->user_agent;
return Status(kOk);
}
@@ -175,7 +175,7 @@ Status ParseMobileEmulation(const base::Value& option,
if (!mobile_emulation->GetString("userAgent", &user_agent))
return Status(kUnknownError, "'userAgent' must be a string");
- capabilities->switches.SetSwitch("user-agent", user_agent);
+ capabilities->user_agent = user_agent;
}
return Status(kOk);
« no previous file with comments | « chrome/test/chromedriver/capabilities.h ('k') | chrome/test/chromedriver/capabilities_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698