OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/chromedriver/session_commands.h" | 5 #include "chrome/test/chromedriver/session_commands.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 if (chrome->GetAsDesktop()) { | 92 if (chrome->GetAsDesktop()) { |
93 chrome_caps->SetString( | 93 chrome_caps->SetString( |
94 "userDataDir", | 94 "userDataDir", |
95 chrome->GetAsDesktop()->command().GetSwitchValueNative( | 95 chrome->GetAsDesktop()->command().GetSwitchValueNative( |
96 "user-data-dir")); | 96 "user-data-dir")); |
97 } | 97 } |
98 caps->Set("chrome", chrome_caps.release()); | 98 caps->Set("chrome", chrome_caps.release()); |
99 return caps.Pass(); | 99 return caps.Pass(); |
100 } | 100 } |
101 | 101 |
102 | |
103 Status InitSessionHelper( | 102 Status InitSessionHelper( |
104 const InitSessionParams& bound_params, | 103 const InitSessionParams& bound_params, |
105 Session* session, | 104 Session* session, |
106 const base::DictionaryValue& params, | 105 const base::DictionaryValue& params, |
107 scoped_ptr<base::Value>* value) { | 106 scoped_ptr<base::Value>* value) { |
108 session->driver_log.reset( | 107 session->driver_log.reset( |
109 new WebDriverLog(WebDriverLog::kDriverType, Log::kAll)); | 108 new WebDriverLog(WebDriverLog::kDriverType, Log::kAll)); |
110 const base::DictionaryValue* desired_caps; | 109 const base::DictionaryValue* desired_caps; |
111 if (!params.GetDictionary("desiredCapabilities", &desired_caps)) | 110 if (!params.GetDictionary("desiredCapabilities", &desired_caps)) |
112 return Status(kUnknownError, "cannot find dict 'desiredCapabilities'"); | 111 return Status(kUnknownError, "cannot find dict 'desiredCapabilities'"); |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 Status ExecuteSetAutoReporting( | 643 Status ExecuteSetAutoReporting( |
645 Session* session, | 644 Session* session, |
646 const base::DictionaryValue& params, | 645 const base::DictionaryValue& params, |
647 scoped_ptr<base::Value>* value) { | 646 scoped_ptr<base::Value>* value) { |
648 bool enabled; | 647 bool enabled; |
649 if (!params.GetBoolean("enabled", &enabled)) | 648 if (!params.GetBoolean("enabled", &enabled)) |
650 return Status(kUnknownError, "missing parameter 'enabled'"); | 649 return Status(kUnknownError, "missing parameter 'enabled'"); |
651 session->auto_reporting_enabled = enabled; | 650 session->auto_reporting_enabled = enabled; |
652 return Status(kOk); | 651 return Status(kOk); |
653 } | 652 } |
OLD | NEW |