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

Unified Diff: chrome/browser/media/webrtc_browsertest_base.h

Issue 2034393004: Allow multiple logging::LogMessage{Handler,Listener}s Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address grt's comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/webrtc_browsertest_base.h
diff --git a/chrome/browser/media/webrtc_browsertest_base.h b/chrome/browser/media/webrtc_browsertest_base.h
index d4d6dcd495d24c8b74fc0daa8cb6c4d5dd75f20c..7669c16af54e5a1a41eac77de19d9a8619df62c1 100644
--- a/chrome/browser/media/webrtc_browsertest_base.h
+++ b/chrome/browser/media/webrtc_browsertest_base.h
@@ -18,6 +18,12 @@ namespace content {
class WebContents;
}
+class JavascriptErrorDetectingListener : logging::LogMessageListener {
+ public:
+ void OnMessage(int severity, const char* file, int line,
+ size_t message_start, const std::string& str) override;
+};
+
// Base class for WebRTC browser tests with useful primitives for interacting
// getUserMedia. We use inheritance here because it makes the test code look
// as clean as it can be.
@@ -187,6 +193,7 @@ class WebRtcTestBase : public InProcessBrowserTest {
content::WebContents* tab_contents,
const std::string& constraints) const;
+ JavascriptErrorDetectingListener log_listener_;
bool detect_errors_in_javascript_;
DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);

Powered by Google App Engine
This is Rietveld 408576698