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

Unified Diff: chrome/browser/history/history_browsertest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (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: chrome/browser/history/history_browsertest.cc
diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc
index ae6f9887e91d7da88890c72d0b944a412feb1e4e..e82e3b2ecff82a7a155561a08a0f483549b398c3 100644
--- a/chrome/browser/history/history_browsertest.cc
+++ b/chrome/browser/history/history_browsertest.cc
@@ -26,7 +26,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_browser_thread.h"
-#include "net/test/spawned_test_server/spawned_test_server.h"
+#include "net/test/embedded_test_server/embedded_test_server.h"
#include "url/gurl.h"
using content::BrowserThread;
@@ -67,10 +67,9 @@ class WaitForHistoryTask : public history::HistoryDBTask {
class HistoryBrowserTest : public InProcessBrowserTest {
protected:
- HistoryBrowserTest()
- : test_server_(net::SpawnedTestServer::TYPE_HTTP,
- net::SpawnedTestServer::kLocalhost,
- base::FilePath(kDocRoot)) {}
+ HistoryBrowserTest() : test_server_() {
+ test_server_.ServeFilesFromSourceDirectory(base::FilePath(kDocRoot));
+ }
void SetUp() override {
ASSERT_TRUE(test_server_.Start());
@@ -120,11 +119,11 @@ class HistoryBrowserTest : public InProcessBrowserTest {
}
void LoadAndWaitForFile(const char* filename) {
- GURL url = test_server_.GetURL(std::string("History") + filename);
+ GURL url = test_server_.GetURL(std::string("/History") + filename);
LoadAndWaitForURL(url);
}
- net::SpawnedTestServer test_server_;
+ net::EmbeddedTestServer test_server_;
};
// Test that the browser history is saved (default setting).
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/history/redirect_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698