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

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

Issue 1461583003: Revert media_browsertest migration back to SpawnedTestServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/media_browsertest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/media_browsertest.cc
diff --git a/chrome/browser/media/media_browsertest.cc b/chrome/browser/media/media_browsertest.cc
index 6aa919e0487e978be21bc1b5bf33d7d4645071b8..38b41981901c64900ec9545a517ef4e724d3591a 100644
--- a/chrome/browser/media/media_browsertest.cc
+++ b/chrome/browser/media/media_browsertest.cc
@@ -15,18 +15,16 @@
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "media/base/test_data_util.h"
-#include "net/test/embedded_test_server/embedded_test_server.h"
+#include "net/test/spawned_test_server/spawned_test_server.h"
// Common test results.
const char MediaBrowserTest::kEnded[] = "ENDED";
const char MediaBrowserTest::kError[] = "ERROR";
const char MediaBrowserTest::kFailed[] = "FAILED";
-MediaBrowserTest::MediaBrowserTest() : ignore_plugin_crash_(false) {
-}
+MediaBrowserTest::MediaBrowserTest() : ignore_plugin_crash_(false) {}
-MediaBrowserTest::~MediaBrowserTest() {
-}
+MediaBrowserTest::~MediaBrowserTest() {}
void MediaBrowserTest::RunMediaTestPage(const std::string& html_page,
const base::StringPairs& query_params,
@@ -34,14 +32,15 @@ void MediaBrowserTest::RunMediaTestPage(const std::string& html_page,
bool http) {
GURL gurl;
std::string query = media::GetURLQueryString(query_params);
- scoped_ptr<net::EmbeddedTestServer> http_test_server;
+ scoped_ptr<net::SpawnedTestServer> http_test_server;
if (http) {
DVLOG(0) << base::TimeFormatTimeOfDayWithMilliseconds(base::Time::Now())
<< " Starting HTTP server";
- http_test_server.reset(new net::EmbeddedTestServer);
- http_test_server->ServeFilesFromSourceDirectory(media::GetTestDataPath());
+ http_test_server.reset(new net::SpawnedTestServer(
+ net::SpawnedTestServer::TYPE_HTTP, net::SpawnedTestServer::kLocalhost,
+ media::GetTestDataPath()));
CHECK(http_test_server->Start());
- gurl = http_test_server->GetURL("/" + html_page + "?" + query);
+ gurl = http_test_server->GetURL("files/" + html_page + "?" + query);
} else {
gurl = content::GetFileUrlWithQuery(media::GetTestDataFilePath(html_page),
query);
« no previous file with comments | « chrome/browser/media/media_browsertest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698