| Index: chrome/test/live_sync/live_sync_test.h
|
| diff --git a/chrome/test/live_sync/live_sync_test.h b/chrome/test/live_sync/live_sync_test.h
|
| old mode 100644
|
| new mode 100755
|
| index cb117959f2421e5dee0b6cb9fbe19d674d628b6a..a9366eb6d0b55e9919177bc1ee04494e39bab8c6
|
| --- a/chrome/test/live_sync/live_sync_test.h
|
| +++ b/chrome/test/live_sync/live_sync_test.h
|
| @@ -58,18 +58,34 @@ class LiveSyncTest : public InProcessBrowserTest {
|
| InProcessBrowserTest::SetUp();
|
| }
|
|
|
| + virtual void TearDown() {
|
| + // Allow the InProcessBrowserTest framework to perform its tear down.
|
| + InProcessBrowserTest::TearDown();
|
| +
|
| + // Stop the local test sync server if one was used.
|
| + if (started_local_test_server_)
|
| + TearDownLocalTestServer();
|
| + }
|
| +
|
| virtual void SetUpLocalTestServer() {
|
| bool success = server_.Start(net::TestServerLauncher::ProtoHTTP,
|
| server_.kHostName, server_.kOKHTTPSPort,
|
| FilePath(), FilePath(), std::wstring());
|
| ASSERT_TRUE(success);
|
|
|
| + started_local_test_server_ = true;
|
| +
|
| CommandLine* cl = CommandLine::ForCurrentProcess();
|
| cl->AppendSwitchWithValue(switches::kSyncServiceURL,
|
| StringPrintf("http://%s:%d/chromiumsync", server_.kHostName,
|
| server_.kOKHTTPSPort));
|
| }
|
|
|
| + virtual void TearDownLocalTestServer() {
|
| + bool success = server_.Stop();
|
| + ASSERT_TRUE(success);
|
| + }
|
| +
|
| // Append command line flag to enable sync.
|
| virtual void SetUpCommandLine(CommandLine* command_line) {
|
| }
|
| @@ -100,6 +116,7 @@ class LiveSyncTest : public InProcessBrowserTest {
|
| scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_;
|
|
|
| net::TestServerLauncher server_;
|
| + bool started_local_test_server_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(LiveSyncTest);
|
| };
|
|
|