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

Unified Diff: chrome/test/chromedriver/util.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/util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/util.cc
diff --git a/chrome/test/chromedriver/util.cc b/chrome/test/chromedriver/util.cc
index e91689d45dcc257d5224f2e3f9876bfe64a05a1c..7671cc7670c56df63a4c43c262792571ce3d42b2 100644
--- a/chrome/test/chromedriver/util.cc
+++ b/chrome/test/chromedriver/util.cc
@@ -9,6 +9,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
+#include "base/memory/scoped_vector.h"
#include "base/rand_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -18,7 +19,9 @@
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/ui_events.h"
#include "chrome/test/chromedriver/chrome/web_view.h"
+#include "chrome/test/chromedriver/command_listener.h"
#include "chrome/test/chromedriver/key_converter.h"
+#include "chrome/test/chromedriver/session.h"
#include "third_party/zlib/google/zip.h"
std::string GenerateId() {
@@ -401,3 +404,15 @@ Status UnzipSoleFile(const base::FilePath& unzip_dir,
*file = first_file;
return Status(kOk);
}
+
+void NotifySessionListenersBeforeCommand(Session* session,
+ const std::string& command_name) {
+ for (ScopedVector<CommandListener>::const_iterator it =
+ session->command_listeners.begin();
+ it != session->command_listeners.end();
+ ++it) {
+ Status status = (*it)->BeforeCommand(command_name);
+ if (status.IsError())
+ LOG(ERROR) << "Error when notifying listener of command";
+ }
+}
« no previous file with comments | « chrome/test/chromedriver/util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698