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 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 34 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
35 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 35 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
36 #include "chrome/browser/ui/browser.h" | 36 #include "chrome/browser/ui/browser.h" |
37 #include "chrome/browser/ui/browser_finder.h" | 37 #include "chrome/browser/ui/browser_finder.h" |
38 #include "chrome/browser/ui/host_desktop.h" | 38 #include "chrome/browser/ui/host_desktop.h" |
39 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 39 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
40 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/test/base/testing_browser_process.h" | 42 #include "chrome/test/base/testing_browser_process.h" |
43 #include "chrome/test/base/ui_test_utils.h" | 43 #include "chrome/test/base/ui_test_utils.h" |
44 #include "components/encryptor/encryptor.h" | 44 #include "components/encryptor/os_crypt.h" |
45 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
46 #include "content/public/test/test_browser_thread.h" | 46 #include "content/public/test/test_browser_thread.h" |
47 #include "google_apis/gaia/gaia_urls.h" | 47 #include "google_apis/gaia/gaia_urls.h" |
48 #include "net/base/escape.h" | 48 #include "net/base/escape.h" |
49 #include "net/base/load_flags.h" | 49 #include "net/base/load_flags.h" |
50 #include "net/base/network_change_notifier.h" | 50 #include "net/base/network_change_notifier.h" |
51 #include "net/proxy/proxy_config.h" | 51 #include "net/proxy/proxy_config.h" |
52 #include "net/proxy/proxy_config_service_fixed.h" | 52 #include "net/proxy/proxy_config_service_fixed.h" |
53 #include "net/proxy/proxy_service.h" | 53 #include "net/proxy/proxy_service.h" |
54 #include "net/test/spawned_test_server/spawned_test_server.h" | 54 #include "net/test/spawned_test_server/spawned_test_server.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // we flag an error. | 173 // we flag an error. |
174 LOG(FATAL) << "Can't figure out how to run a server."; | 174 LOG(FATAL) << "Can't figure out how to run a server."; |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 if (username_.empty() || password_.empty()) | 178 if (username_.empty() || password_.empty()) |
179 LOG(FATAL) << "Cannot run sync tests without GAIA credentials."; | 179 LOG(FATAL) << "Cannot run sync tests without GAIA credentials."; |
180 | 180 |
181 // Mock the Mac Keychain service. The real Keychain can block on user input. | 181 // Mock the Mac Keychain service. The real Keychain can block on user input. |
182 #if defined(OS_MACOSX) | 182 #if defined(OS_MACOSX) |
183 Encryptor::UseMockKeychain(true); | 183 OSCrypt::UseMockKeychain(true); |
184 #endif | 184 #endif |
185 | 185 |
186 // Start up a sync test server if one is needed and setup mock gaia responses. | 186 // Start up a sync test server if one is needed and setup mock gaia responses. |
187 // Note: This must be done prior to the call to SetupClients() because we want | 187 // Note: This must be done prior to the call to SetupClients() because we want |
188 // the mock gaia responses to be available before GaiaUrls is initialized. | 188 // the mock gaia responses to be available before GaiaUrls is initialized. |
189 SetUpTestServerIfRequired(); | 189 SetUpTestServerIfRequired(); |
190 | 190 |
191 // Yield control back to the InProcessBrowserTest framework. | 191 // Yield control back to the InProcessBrowserTest framework. |
192 InProcessBrowserTest::SetUp(); | 192 InProcessBrowserTest::SetUp(); |
193 } | 193 } |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 BrowserThread::IO, FROM_HERE, | 879 BrowserThread::IO, FROM_HERE, |
880 base::Bind(&SetProxyConfigCallback, &done, | 880 base::Bind(&SetProxyConfigCallback, &done, |
881 make_scoped_refptr(context_getter), proxy_config)); | 881 make_scoped_refptr(context_getter), proxy_config)); |
882 done.Wait(); | 882 done.Wait(); |
883 } | 883 } |
884 | 884 |
885 void SyncTest::UseFakeServer() { | 885 void SyncTest::UseFakeServer() { |
886 DCHECK_EQ(SERVER_TYPE_UNDECIDED, server_type_); | 886 DCHECK_EQ(SERVER_TYPE_UNDECIDED, server_type_); |
887 server_type_ = IN_PROCESS_FAKE_SERVER; | 887 server_type_ = IN_PROCESS_FAKE_SERVER; |
888 } | 888 } |
OLD | NEW |