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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

Issue 454133003: [ChromeDriver] Implementing tracing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 6 years, 4 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 unified diff | Download patch
OLDNEW
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (capabilities.logging_prefs.count(WebDriverLog::kDriverType)) 122 if (capabilities.logging_prefs.count(WebDriverLog::kDriverType))
123 driver_level = capabilities.logging_prefs[WebDriverLog::kDriverType]; 123 driver_level = capabilities.logging_prefs[WebDriverLog::kDriverType];
124 session->driver_log->set_min_level(driver_level); 124 session->driver_log->set_min_level(driver_level);
125 125
126 // Create Log's and DevToolsEventListener's for ones that are DevTools-based. 126 // Create Log's and DevToolsEventListener's for ones that are DevTools-based.
127 // Session will own the Log's, Chrome will own the listeners. 127 // Session will own the Log's, Chrome will own the listeners.
128 // Also create |CommandListener|s for the appropriate logs. 128 // Also create |CommandListener|s for the appropriate logs.
129 ScopedVector<DevToolsEventListener> devtools_event_listeners; 129 ScopedVector<DevToolsEventListener> devtools_event_listeners;
130 ScopedVector<CommandListener> command_listeners; 130 ScopedVector<CommandListener> command_listeners;
131 status = CreateLogs(capabilities, 131 status = CreateLogs(capabilities,
132 session,
132 &session->devtools_logs, 133 &session->devtools_logs,
133 &devtools_event_listeners, 134 &devtools_event_listeners,
134 &command_listeners); 135 &command_listeners);
135 if (status.IsError()) 136 if (status.IsError())
136 return status; 137 return status;
137 138
138 // |session| will own the |CommandListener|s. 139 // |session| will own the |CommandListener|s.
139 session->command_listeners.swap(command_listeners); 140 session->command_listeners.swap(command_listeners);
140 141
141 status = LaunchChrome(bound_params.context_getter.get(), 142 status = LaunchChrome(bound_params.context_getter.get(),
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 Status ExecuteSetAutoReporting( 655 Status ExecuteSetAutoReporting(
655 Session* session, 656 Session* session,
656 const base::DictionaryValue& params, 657 const base::DictionaryValue& params,
657 scoped_ptr<base::Value>* value) { 658 scoped_ptr<base::Value>* value) {
658 bool enabled; 659 bool enabled;
659 if (!params.GetBoolean("enabled", &enabled)) 660 if (!params.GetBoolean("enabled", &enabled))
660 return Status(kUnknownError, "missing parameter 'enabled'"); 661 return Status(kUnknownError, "missing parameter 'enabled'");
661 session->auto_reporting_enabled = enabled; 662 session->auto_reporting_enabled = enabled;
662 return Status(kOk); 663 return Status(kOk);
663 } 664 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/performance_logger_unittest.cc ('k') | chrome/test/chromedriver/test/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698