| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/commands.h" | 5 #include "chrome/test/chromedriver/commands.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 scoped_ptr<base::Value>* out_value) { | 81 scoped_ptr<base::Value>* out_value) { |
| 82 int port; | 82 int port; |
| 83 if (!FindOpenPort(&port)) | 83 if (!FindOpenPort(&port)) |
| 84 return Status(kUnknownError, "failed to find an open port for Chrome"); | 84 return Status(kUnknownError, "failed to find an open port for Chrome"); |
| 85 | 85 |
| 86 const base::DictionaryValue* desired_caps; | 86 const base::DictionaryValue* desired_caps; |
| 87 if (!params.GetDictionary("desiredCapabilities", &desired_caps)) | 87 if (!params.GetDictionary("desiredCapabilities", &desired_caps)) |
| 88 return Status(kUnknownError, "cannot find dict 'desiredCapabilities'"); | 88 return Status(kUnknownError, "cannot find dict 'desiredCapabilities'"); |
| 89 | 89 |
| 90 Capabilities capabilities; | 90 Capabilities capabilities; |
| 91 Status status = capabilities.Parse(*desired_caps); | 91 Status status = capabilities.Parse(*desired_caps, bound_params.log); |
| 92 if (status.IsError()) | 92 if (status.IsError()) |
| 93 return status; | 93 return status; |
| 94 | 94 |
| 95 // Create Log's and DevToolsEventListener's for ones that are DevTools-based. | 95 // Create Log's and DevToolsEventListener's for ones that are DevTools-based. |
| 96 // Session will own the Log's, Chrome will own the listeners. | 96 // Session will own the Log's, Chrome will own the listeners. |
| 97 ScopedVector<WebDriverLog> devtools_logs; | 97 ScopedVector<WebDriverLog> devtools_logs; |
| 98 ScopedVector<DevToolsEventListener> devtools_event_listeners; | 98 ScopedVector<DevToolsEventListener> devtools_event_listeners; |
| 99 status = CreateLogs(capabilities, &devtools_logs, &devtools_event_listeners); | 99 status = CreateLogs(capabilities, &devtools_logs, &devtools_event_listeners); |
| 100 if (status.IsError()) | 100 if (status.IsError()) |
| 101 return status; | 101 return status; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 namespace internal { | 295 namespace internal { |
| 296 | 296 |
| 297 void CreateSessionOnSessionThreadForTesting(const std::string& id) { | 297 void CreateSessionOnSessionThreadForTesting(const std::string& id) { |
| 298 lazy_tls_session.Pointer()->Set(new Session(id)); | 298 lazy_tls_session.Pointer()->Set(new Session(id)); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace internal | 301 } // namespace internal |
| OLD | NEW |