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

Side by Side Diff: chrome/test/chromedriver/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 unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 Status(return_ok_without_session ? kOk : kNoSuchSession), 144 Status(return_ok_without_session ? kOk : kNoSuchSession),
145 base::Passed(scoped_ptr<base::Value>()), 145 base::Passed(scoped_ptr<base::Value>()),
146 std::string())); 146 std::string()));
147 return; 147 return;
148 } 148 }
149 149
150 if (IsVLogOn(0)) { 150 if (IsVLogOn(0)) {
151 VLOG(0) << "COMMAND " << command_name << " " 151 VLOG(0) << "COMMAND " << command_name << " "
152 << FormatValueForDisplay(*params); 152 << FormatValueForDisplay(*params);
153 } 153 }
154
155 // Notify |session|'s |CommandListener|s of the command.
156 NotifySessionListenersBeforeCommand(session, command_name);
157
154 scoped_ptr<base::Value> value; 158 scoped_ptr<base::Value> value;
155 Status status = command.Run(session, *params, &value); 159 Status status = command.Run(session, *params, &value);
156 160
157 if (status.IsError() && session->chrome) { 161 if (status.IsError() && session->chrome) {
158 if (!session->quit && session->chrome->HasCrashedWebView()) { 162 if (!session->quit && session->chrome->HasCrashedWebView()) {
159 session->quit = true; 163 session->quit = true;
160 std::string message("session deleted because of page crash"); 164 std::string message("session deleted because of page crash");
161 if (!session->detach) { 165 if (!session->detach) {
162 Status quit_status = session->chrome->Quit(); 166 Status quit_status = session->chrome->Quit();
163 if (quit_status.IsError()) 167 if (quit_status.IsError())
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 247 }
244 } 248 }
245 249
246 namespace internal { 250 namespace internal {
247 251
248 void CreateSessionOnSessionThreadForTesting(const std::string& id) { 252 void CreateSessionOnSessionThreadForTesting(const std::string& id) {
249 SetThreadLocalSession(make_scoped_ptr(new Session(id))); 253 SetThreadLocalSession(make_scoped_ptr(new Session(id)));
250 } 254 }
251 255
252 } // namespace internal 256 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/command_listener_proxy_unittest.cc ('k') | chrome/test/chromedriver/commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698