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

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

Issue 216773002: Relanding Switched main WebRTC browser tests to use a more realistic video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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"
10 #include "base/process/process_handle.h" 11 #include "base/process/process_handle.h"
11 12
12 namespace content { 13 namespace content {
13 class WebContents; 14 class WebContents;
14 } 15 }
15 16
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
16 // Executes javascript code which will sleep for |timeout_msec| milliseconds. 35 // Executes javascript code which will sleep for |timeout_msec| milliseconds.
17 // Returns true on success. 36 // Returns true on success.
18 bool SleepInJavascript(content::WebContents* tab_contents, int timeout_msec); 37 bool SleepInJavascript(content::WebContents* tab_contents, int timeout_msec);
19 38
20 // This function will execute the provided |javascript| until it causes a call 39 // This function will execute the provided |javascript| until it causes a call
21 // to window.domAutomationController.send() with |evaluates_to| as the message. 40 // to window.domAutomationController.send() with |evaluates_to| as the message.
22 // That is, we are NOT checking what the javascript evaluates to. Returns false 41 // That is, we are NOT checking what the javascript evaluates to. Returns false
23 // if we exceed the TestTimeouts::action_max_timeout(). 42 // if we exceed the TestTimeouts::action_max_timeout().
24 // TODO(phoglund): Consider a better interaction method with the javascript 43 // TODO(phoglund): Consider a better interaction method with the javascript
25 // than polling javascript methods. 44 // than polling javascript methods.
(...skipping 11 matching lines...) Expand all
37 56
38 PeerConnectionServerRunner(): server_pid_(0) {} 57 PeerConnectionServerRunner(): server_pid_(0) {}
39 ~PeerConnectionServerRunner() {} 58 ~PeerConnectionServerRunner() {}
40 59
41 // Starts the peerconnection server on localhost on |kDefaultPort|. 60 // Starts the peerconnection server on localhost on |kDefaultPort|.
42 bool Start(); 61 bool Start();
43 62
44 // Stops the peerconnection server. 63 // Stops the peerconnection server.
45 bool Stop(); 64 bool Stop();
46 65
47 static void KillAllPeerConnectionServersOnCurrentSystem(); 66 static void KillAllPeerConnectionServers();
48 67
49 private: 68 private:
50 base::ProcessHandle server_pid_; 69 base::ProcessHandle server_pid_;
51 }; 70 };
52 71
72 } // namespace test
73
53 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_ 74 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_base.cc ('k') | chrome/browser/media/webrtc_browsertest_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698