| OLD | NEW |
| 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/files/file_path.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // TODO(phoglund): Consider a better interaction method with the javascript | 47 // TODO(phoglund): Consider a better interaction method with the javascript |
| 48 // than polling javascript methods. | 48 // than polling javascript methods. |
| 49 bool PollingWaitUntil(const std::string& javascript, | 49 bool PollingWaitUntil(const std::string& javascript, |
| 50 const std::string& evaluates_to, | 50 const std::string& evaluates_to, |
| 51 content::WebContents* tab_contents); | 51 content::WebContents* tab_contents); |
| 52 bool PollingWaitUntil(const std::string& javascript, | 52 bool PollingWaitUntil(const std::string& javascript, |
| 53 const std::string& evaluates_to, | 53 const std::string& evaluates_to, |
| 54 content::WebContents* tab_contents, | 54 content::WebContents* tab_contents, |
| 55 int poll_interval_msec); | 55 int poll_interval_msec); |
| 56 | 56 |
| 57 class PeerConnectionServerRunner { | |
| 58 public: | |
| 59 static const char kDefaultPort[]; | |
| 60 | |
| 61 PeerConnectionServerRunner(): server_pid_(0) {} | |
| 62 ~PeerConnectionServerRunner() {} | |
| 63 | |
| 64 // Starts the peerconnection server on localhost on |kDefaultPort|. | |
| 65 bool Start(); | |
| 66 | |
| 67 // Stops the peerconnection server. | |
| 68 bool Stop(); | |
| 69 | |
| 70 static void KillAllPeerConnectionServers(); | |
| 71 | |
| 72 private: | |
| 73 base::ProcessHandle server_pid_; | |
| 74 }; | |
| 75 | |
| 76 } // namespace test | 57 } // namespace test |
| 77 | 58 |
| 78 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_ | 59 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_COMMON_H_ |
| OLD | NEW |