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

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

Issue 1411073005: Migrating tests to use EmbeddedTestServer (/content) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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
Index: content/browser/media/media_browsertest.cc
diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc
index f47c4a506a96769b690649e0de1e995f91daff8d..d0955cc7180182862ca09055d25dc5577051c7cc 100644
--- a/content/browser/media/media_browsertest.cc
+++ b/content/browser/media/media_browsertest.cc
@@ -11,7 +11,7 @@
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "media/base/test_data_util.h"
-#include "net/test/spawned_test_server/spawned_test_server.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
namespace content {
@@ -26,14 +26,12 @@ void MediaBrowserTest::RunMediaTestPage(const std::string& html_page,
bool http) {
GURL gurl;
std::string query = media::GetURLQueryString(query_params);
- scoped_ptr<net::SpawnedTestServer> http_test_server;
+ scoped_ptr<net::EmbeddedTestServer> http_test_server;
if (http) {
- http_test_server.reset(
- new net::SpawnedTestServer(net::SpawnedTestServer::TYPE_HTTP,
- net::SpawnedTestServer::kLocalhost,
- media::GetTestDataPath()));
+ http_test_server.reset(new net::EmbeddedTestServer);
+ http_test_server->ServeFilesFromSourceDirectory(media::GetTestDataPath());
CHECK(http_test_server->Start());
- gurl = http_test_server->GetURL("files/" + html_page + "?" + query);
+ gurl = http_test_server->GetURL("/" + html_page + "?" + query);
} else {
gurl = content::GetFileUrlWithQuery(media::GetTestDataFilePath(html_page),
query);
« no previous file with comments | « content/browser/media/media_browsertest.h ('k') | content/browser/media/webrtc_audio_debug_recordings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698