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

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

Issue 2776313003: Update ChromeDriver to accept W3C format InitSession (Closed)
Patch Set: Require chromeOptions.w3c to turn on w3c mode Created 3 years, 9 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/client/chromedriver.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/session_commands.cc
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index 1a39f53bc3a0574e07e8fb9e9ea019677c0ae3ee..9e7e751a85bb8b8fcbf309efc15b5e7c56f5f054 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -177,13 +177,17 @@ Status InitSessionHelper(const InitSessionParams& bound_params,
new WebDriverLog(WebDriverLog::kDriverType, Log::kAll));
const base::DictionaryValue* desired_caps;
bool w3c_capability = false;
- if (params.GetDictionary("capabilities.desiredCapabilities", &desired_caps)
+ if ((params.GetDictionary("capabilities.alwaysMatch", &desired_caps) ||
+ params.GetDictionary("capabilities.desiredCapabilities", &desired_caps))
&& desired_caps->GetBoolean("chromeOptions.w3c", &w3c_capability)
&& w3c_capability)
+ // TBD: Handle capabilities.firstMatch.
samuong 2017/03/28 23:02:48 s/TBD/TODO(johnchen)/
session->w3c_compliant = true;
else if (!params.GetDictionary("desiredCapabilities", &desired_caps) &&
+ !params.GetDictionary("capabilities.alwaysMatch", &desired_caps) &&
!params.GetDictionary("capabilities.desiredCapabilities", &desired_caps))
samuong 2017/03/28 23:02:48 I think these last two checks are redundant, since
- return Status(kUnknownError, "cannot find dict 'desiredCapabilities'");
+ return Status(kUnknownError,
+ "cannot find dict 'alwaysMatch' or 'desiredCapabilities'");
Capabilities capabilities;
Status status = capabilities.Parse(*desired_caps);
« no previous file with comments | « chrome/test/chromedriver/client/chromedriver.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698