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

Side by Side Diff: chrome/browser/media/webrtc/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: rebase Created 3 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/media/webrtc/test_stats_dictionary.h" 13 #include "chrome/browser/media/webrtc/test_stats_dictionary.h"
14 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
15 15
16 namespace infobars { 16 namespace infobars {
17 class InfoBar; 17 class InfoBar;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 class JavascriptErrorDetectingListener : logging::LogMessageListener {
25 public:
26 void OnMessage(int severity,
27 const char* file,
28 int line,
29 size_t message_start,
30 const std::string& str) override;
31 };
32
24 // Base class for WebRTC browser tests with useful primitives for interacting 33 // Base class for WebRTC browser tests with useful primitives for interacting
25 // getUserMedia. We use inheritance here because it makes the test code look 34 // getUserMedia. We use inheritance here because it makes the test code look
26 // as clean as it can be. 35 // as clean as it can be.
27 class WebRtcTestBase : public InProcessBrowserTest { 36 class WebRtcTestBase : public InProcessBrowserTest {
28 public: 37 public:
29 // Typical constraints. 38 // Typical constraints.
30 static const char kAudioVideoCallConstraints[]; 39 static const char kAudioVideoCallConstraints[];
31 static const char kAudioOnlyCallConstraints[]; 40 static const char kAudioOnlyCallConstraints[];
32 static const char kVideoOnlyCallConstraints[]; 41 static const char kVideoOnlyCallConstraints[];
33 static const char kVideoCallConstraintsQVGA[]; 42 static const char kVideoCallConstraintsQVGA[];
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 content::WebContents* to_tab) const; 202 content::WebContents* to_tab) const;
194 void ReceiveAnswer(const std::string& answer, 203 void ReceiveAnswer(const std::string& answer,
195 content::WebContents* from_tab) const; 204 content::WebContents* from_tab) const;
196 void GatherAndSendIceCandidates(content::WebContents* from_tab, 205 void GatherAndSendIceCandidates(content::WebContents* from_tab,
197 content::WebContents* to_tab) const; 206 content::WebContents* to_tab) const;
198 207
199 infobars::InfoBar* GetUserMediaAndWaitForInfoBar( 208 infobars::InfoBar* GetUserMediaAndWaitForInfoBar(
200 content::WebContents* tab_contents, 209 content::WebContents* tab_contents,
201 const std::string& constraints) const; 210 const std::string& constraints) const;
202 211
212 JavascriptErrorDetectingListener listener_;
203 bool detect_errors_in_javascript_; 213 bool detect_errors_in_javascript_;
204 214
205 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); 215 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);
206 }; 216 };
207 217
208 #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_ 218 #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_unittest.cc ('k') | chrome/browser/media/webrtc/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698