summaryrefslogtreecommitdiffstats
path: root/chrome/test/live_sync
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/live_sync')
-rw-r--r--chrome/test/live_sync/live_sync_test.cc17
-rw-r--r--chrome/test/live_sync/live_sync_test.h3
2 files changed, 9 insertions, 11 deletions
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index e09573b..8297006 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -240,22 +240,19 @@ void LiveSyncTest::TearDownInProcessBrowserTestFixture() {
}
void LiveSyncTest::SetUpLocalTestServer() {
- bool success = server_.Start(net::TestServerLauncher::ProtoHTTP,
- server_.kHostName, server_.kOKHTTPSPort,
- FilePath(), FilePath(), std::wstring());
- ASSERT_TRUE(success);
+ ASSERT_TRUE(test_server_.Start());
started_local_test_server_ = true;
CommandLine* cl = CommandLine::ForCurrentProcess();
cl->AppendSwitchASCII(switches::kSyncServiceURL,
- StringPrintf("http://%s:%d/chromiumsync", server_.kHostName,
- server_.kOKHTTPSPort));
+ StringPrintf("http://%s:%d/chromiumsync",
+ test_server_.host_port_pair().host().c_str(),
+ test_server_.host_port_pair().port()));
}
void LiveSyncTest::TearDownLocalTestServer() {
- bool success = server_.Stop();
- ASSERT_TRUE(success);
+ ASSERT_TRUE(test_server_.Stop());
}
@@ -295,8 +292,8 @@ void LiveSyncTest::SetProxyConfig(URLRequestContextGetter* context_getter,
bool LiveSyncTest::ConfigureSyncServer(const std::string& name,
const std::string& value) {
std::string url = StringPrintf("http://%s:%d/chromiumsync/configure",
- server_.kHostName,
- server_.kOKHTTPSPort);
+ test_server_.host_port_pair().host().c_str(),
+ test_server_.host_port_pair().port());
std::string data = EscapePath(name) + "=" + EscapePath(value);
ConfigureURLFectcherDelegate delegate;
scoped_ptr<URLFetcher> fetcher(
diff --git a/chrome/test/live_sync/live_sync_test.h b/chrome/test/live_sync/live_sync_test.h
index 0026251..134b200 100644
--- a/chrome/test/live_sync/live_sync_test.h
+++ b/chrome/test/live_sync/live_sync_test.h
@@ -60,6 +60,7 @@ class LiveSyncTest : public InProcessBrowserTest {
explicit LiveSyncTest(TestType test_type)
: test_type_(test_type),
num_clients_(-1),
+ test_server_(net::TestServer::TYPE_HTTP, FilePath()),
started_local_test_server_(false) {
InProcessBrowserTest::set_show_window(true);
InProcessBrowserTest::SetInitialTimeoutInMS(kTestTimeoutInMS);
@@ -195,7 +196,7 @@ class LiveSyncTest : public InProcessBrowserTest {
scoped_ptr<Profile> verifier_;
// Local instance of python sync server.
- net::TestServerLauncher server_;
+ net::TestServer test_server_;
// Keeps track of whether a local python sync server was used for a test.
bool started_local_test_server_;