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

Side by Side Diff: chrome/browser/media/webrtc_browsertest_base.h

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 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 | Annotate | Revision Log
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_BROWSERTEST_BASE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
11 11
12 class InfoBar; 12 class InfoBar;
13 13
14 namespace content { 14 namespace content {
15 class WebContents; 15 class WebContents;
16 } 16 }
17 17
18 // Base class for WebRTC browser tests with useful primitives for interacting 18 // Base class for WebRTC browser tests with useful primitives for interacting
19 // getUserMedia. We use inheritance here because it makes the test code look 19 // getUserMedia. We use inheritance here because it makes the test code look
20 // as clean as it can be. 20 // as clean as it can be.
21 class WebRtcTestBase : public InProcessBrowserTest { 21 class WebRtcTestBase : public InProcessBrowserTest {
22 protected: 22 protected:
23 // Typical constraints. 23 // Typical constraints.
24 static const char kAudioVideoCallConstraints[]; 24 static const char kAudioVideoCallConstraints[];
25 static const char kAudioOnlyCallConstraints[]; 25 static const char kAudioOnlyCallConstraints[];
26 static const char kVideoOnlyCallConstraints[]; 26 static const char kVideoOnlyCallConstraints[];
27 27
28 static const char kFailedWithPermissionDeniedError[]; 28 static const char kFailedWithPermissionDeniedError[];
29 static const char kFailedWithPermissionDismissedError[];
29 30
30 WebRtcTestBase(); 31 WebRtcTestBase();
31 virtual ~WebRtcTestBase(); 32 virtual ~WebRtcTestBase();
32 33
33 // These all require that the loaded page fulfills the public interface in 34 // These all require that the loaded page fulfills the public interface in
34 // chrome/test/data/webrtc/message_handling.js. 35 // chrome/test/data/webrtc/message_handling.js.
35 void GetUserMediaAndAccept(content::WebContents* tab_contents) const; 36 void GetUserMediaAndAccept(content::WebContents* tab_contents) const;
36 void GetUserMediaWithSpecificConstraintsAndAccept( 37 void GetUserMediaWithSpecificConstraintsAndAccept(
37 content::WebContents* tab_contents, 38 content::WebContents* tab_contents,
38 const std::string& constraints) const; 39 const std::string& constraints) const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 InfoBar* infobar) const; 87 InfoBar* infobar) const;
87 InfoBar* GetUserMediaAndWaitForInfoBar(content::WebContents* tab_contents, 88 InfoBar* GetUserMediaAndWaitForInfoBar(content::WebContents* tab_contents,
88 const std::string& constraints) const; 89 const std::string& constraints) const;
89 90
90 bool detect_errors_in_javascript_; 91 bool detect_errors_in_javascript_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); 93 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);
93 }; 94 };
94 95
95 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ 96 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_infobar_delegate.cc ('k') | chrome/browser/media/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698