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

Unified Diff: chrome/browser/media/webrtc_browsertest_common.cc

Issue 271653002: Rewrote WebRTC browser tests to not use peerconnection_server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fixes Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_common.h ('k') | chrome/test/data/webrtc/getusermedia.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc_browsertest_common.cc
diff --git a/chrome/browser/media/webrtc_browsertest_common.cc b/chrome/browser/media/webrtc_browsertest_common.cc
index eb2e0ce87fddcff7f1389078c44d64e365a20261..f66c8102b85d69cd13ca5451ba4de6800c57122c 100644
--- a/chrome/browser/media/webrtc_browsertest_common.cc
+++ b/chrome/browser/media/webrtc_browsertest_common.cc
@@ -4,10 +4,8 @@
#include "chrome/browser/media/webrtc_browsertest_common.h"
-#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/process/launch.h"
#include "base/strings/stringprintf.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
@@ -134,49 +132,4 @@ bool PollingWaitUntil(const std::string& javascript,
return false;
}
-static base::FilePath::CharType kServerExecutable[] =
-#if defined(OS_WIN)
- FILE_PATH_LITERAL("peerconnection_server.exe");
-#else
- FILE_PATH_LITERAL("peerconnection_server");
-#endif
-
-const char PeerConnectionServerRunner::kDefaultPort[] = "7778";
-
-bool PeerConnectionServerRunner::Start() {
- base::FilePath peerconnection_server;
- if (!PathService::Get(base::DIR_MODULE, &peerconnection_server)) {
- LOG(ERROR) << "Failed retrieving base::DIR_MODULE!";
- return false;
- }
- peerconnection_server = peerconnection_server.Append(kServerExecutable);
-
- if (!base::PathExists(peerconnection_server)) {
- LOG(ERROR)
- << "Missing " << kServerExecutable << ". You must build "
- << "it so it ends up next to the browser test binary.";
- return false;
- }
-
- CommandLine command_line(peerconnection_server);
- command_line.AppendSwitchASCII("port", kDefaultPort);
- VLOG(0) << "Running " << command_line.GetCommandLineString();
- return base::LaunchProcess(command_line,
- base::LaunchOptions(),
- &server_pid_);
-}
-
-bool PeerConnectionServerRunner::Stop() {
- return base::KillProcess(server_pid_, 0, false);
-}
-
-void PeerConnectionServerRunner::KillAllPeerConnectionServers() {
- if (!base::KillProcesses(kServerExecutable, -1, NULL)) {
- LOG(ERROR) << "Failed to kill instances of " << kServerExecutable << ".";
- return;
- }
- base::WaitForProcessesToExit(kServerExecutable,
- base::TimeDelta::FromSeconds(5), NULL);
-}
-
} // namespace test
« no previous file with comments | « chrome/browser/media/webrtc_browsertest_common.h ('k') | chrome/test/data/webrtc/getusermedia.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698