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

Side by Side Diff: trunk/src/chrome/browser/media/webrtc_browsertest_common.h

Issue 217553002: Revert 260213 "Relanding Switched main WebRTC browser tests to u..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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_COMMON_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h"
11 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
12 11
13 namespace content { 12 namespace content {
14 class WebContents; 13 class WebContents;
15 } 14 }
16 15
17 namespace test {
18
19 // Reference video locations.
20
21 // Checks if the user has the reference video files, returns true if so.
22 // If the user's checkout don't have these dirs, they need to configure their
23 // .gclient as described in kAdviseOnGclientSolution. The reason for this is
24 // that we don't want to burden regular chrome devs with downloading these
25 // sizable reference files by default.
26 bool HasReferenceFilesInCheckout();
27
28 // Retrieves the reference video dir, to which file names can be appended.
29 base::FilePath GetReferenceVideosDir();
30
31 extern const base::FilePath::CharType kReferenceFileName360p[];
32 extern const base::FilePath::CharType kYuvFileExtension[];
33 extern const base::FilePath::CharType kY4mFileExtension[];
34
35 // Executes javascript code which will sleep for |timeout_msec| milliseconds. 16 // Executes javascript code which will sleep for |timeout_msec| milliseconds.
36 // Returns true on success. 17 // Returns true on success.
37 bool SleepInJavascript(content::WebContents* tab_contents, int timeout_msec); 18 bool SleepInJavascript(content::WebContents* tab_contents, int timeout_msec);
38 19
39 // This function will execute the provided |javascript| until it causes a call 20 // This function will execute the provided |javascript| until it causes a call
40 // to window.domAutomationController.send() with |evaluates_to| as the message. 21 // to window.domAutomationController.send() with |evaluates_to| as the message.
41 // That is, we are NOT checking what the javascript evaluates to. Returns false 22 // That is, we are NOT checking what the javascript evaluates to. Returns false
42 // if we exceed the TestTimeouts::action_max_timeout(). 23 // if we exceed the TestTimeouts::action_max_timeout().
43 // TODO(phoglund): Consider a better interaction method with the javascript 24 // TODO(phoglund): Consider a better interaction method with the javascript
44 // than polling javascript methods. 25 // than polling javascript methods.
(...skipping 11 matching lines...) Expand all
56 37
57 PeerConnectionServerRunner(): server_pid_(0) {} 38 PeerConnectionServerRunner(): server_pid_(0) {}
58 ~PeerConnectionServerRunner() {} 39 ~PeerConnectionServerRunner() {}
59 40
60 // Starts the peerconnection server on localhost on |kDefaultPort|. 41 // Starts the peerconnection server on localhost on |kDefaultPort|.
61 bool Start(); 42 bool Start();
62 43
63 // Stops the peerconnection server. 44 // Stops the peerconnection server.
64 bool Stop(); 45 bool Stop();
65 46
66 static void KillAllPeerConnectionServers(); 47 static void KillAllPeerConnectionServersOnCurrentSystem();
67 48
68 private: 49 private:
69 base::ProcessHandle server_pid_; 50 base::ProcessHandle server_pid_;
70 }; 51 };
71 52
72 } // namespace test
73
74 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_ 53 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/media/webrtc_browsertest_base.cc ('k') | trunk/src/chrome/browser/media/webrtc_browsertest_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698