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

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

Issue 353063005: [ChromeDriver] Subscribe PerformanceLogger to CommandListener interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unnecessary check in test Created 6 years, 5 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/session.h ('k') | chrome/test/chromedriver/session_unittest.cc » ('j') | 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 864ffd7fa53459f950b43927aced3df20eac65ca..5e6f24897dcfb60b6057b45f9b6b178c79b88c89 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -28,6 +28,7 @@
#include "chrome/test/chromedriver/chrome/version.h"
#include "chrome/test/chromedriver/chrome/web_view.h"
#include "chrome/test/chromedriver/chrome_launcher.h"
+#include "chrome/test/chromedriver/command_listener.h"
#include "chrome/test/chromedriver/logging.h"
#include "chrome/test/chromedriver/net/url_request_context_getter.h"
#include "chrome/test/chromedriver/session.h"
@@ -124,13 +125,18 @@ Status InitSessionHelper(
// Create Log's and DevToolsEventListener's for ones that are DevTools-based.
// Session will own the Log's, Chrome will own the listeners.
+ // Also create |CommandListener|s for the appropriate logs.
ScopedVector<DevToolsEventListener> devtools_event_listeners;
+ ScopedVector<CommandListener> command_listeners;
status = CreateLogs(capabilities,
&session->devtools_logs,
- &devtools_event_listeners);
+ &devtools_event_listeners, &command_listeners);
if (status.IsError())
return status;
+ // |session| will own the |CommandListener|s.
+ session->command_listeners.swap(command_listeners);
+
status = LaunchChrome(bound_params.context_getter.get(),
bound_params.socket_factory,
bound_params.device_manager,
« no previous file with comments | « chrome/test/chromedriver/session.h ('k') | chrome/test/chromedriver/session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698