OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/sync_test.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 base::PlatformThread::Sleep(wait / intervals); | 853 base::PlatformThread::Sleep(wait / intervals); |
854 } | 854 } |
855 return false; | 855 return false; |
856 } | 856 } |
857 | 857 |
858 bool SyncTest::IsTestServerRunning() { | 858 bool SyncTest::IsTestServerRunning() { |
859 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 859 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
860 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); | 860 std::string sync_url = cl->GetSwitchValueASCII(switches::kSyncServiceURL); |
861 GURL sync_url_status(sync_url.append("/healthz")); | 861 GURL sync_url_status(sync_url.append("/healthz")); |
862 SyncServerStatusChecker delegate; | 862 SyncServerStatusChecker delegate; |
863 scoped_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create( | 863 scoped_ptr<net::URLFetcher> fetcher = |
864 sync_url_status, net::URLFetcher::GET, &delegate)); | 864 net::URLFetcher::Create(sync_url_status, net::URLFetcher::GET, &delegate); |
865 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | | 865 fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | |
866 net::LOAD_DO_NOT_SEND_COOKIES | | 866 net::LOAD_DO_NOT_SEND_COOKIES | |
867 net::LOAD_DO_NOT_SAVE_COOKIES); | 867 net::LOAD_DO_NOT_SAVE_COOKIES); |
868 fetcher->SetRequestContext(g_browser_process->system_request_context()); | 868 fetcher->SetRequestContext(g_browser_process->system_request_context()); |
869 fetcher->Start(); | 869 fetcher->Start(); |
870 content::RunMessageLoop(); | 870 content::RunMessageLoop(); |
871 return delegate.running(); | 871 return delegate.running(); |
872 } | 872 } |
873 | 873 |
874 bool SyncTest::TestUsesSelfNotifications() { | 874 bool SyncTest::TestUsesSelfNotifications() { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 } | 1015 } |
1016 | 1016 |
1017 fake_server::FakeServer* SyncTest::GetFakeServer() const { | 1017 fake_server::FakeServer* SyncTest::GetFakeServer() const { |
1018 return fake_server_.get(); | 1018 return fake_server_.get(); |
1019 } | 1019 } |
1020 | 1020 |
1021 void SyncTest::SetPreexistingPreferencesFileContents( | 1021 void SyncTest::SetPreexistingPreferencesFileContents( |
1022 const std::string& contents) { | 1022 const std::string& contents) { |
1023 preexisting_preferences_file_contents_ = contents; | 1023 preexisting_preferences_file_contents_ = contents; |
1024 } | 1024 } |
OLD | NEW |