| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 172       // we flag an error. | 172       // we flag an error. | 
| 173       LOG(FATAL) << "Can't figure out how to run a server."; | 173       LOG(FATAL) << "Can't figure out how to run a server."; | 
| 174     } | 174     } | 
| 175   } | 175   } | 
| 176 | 176 | 
| 177   if (username_.empty() || password_.empty()) | 177   if (username_.empty() || password_.empty()) | 
| 178     LOG(FATAL) << "Cannot run sync tests without GAIA credentials."; | 178     LOG(FATAL) << "Cannot run sync tests without GAIA credentials."; | 
| 179 | 179 | 
| 180   // Mock the Mac Keychain service.  The real Keychain can block on user input. | 180   // Mock the Mac Keychain service.  The real Keychain can block on user input. | 
| 181 #if defined(OS_MACOSX) | 181 #if defined(OS_MACOSX) | 
| 182   Encryptor::UseMockKeychain(true); | 182   OSCrypt::UseMockKeychain(true); | 
| 183 #endif | 183 #endif | 
| 184 | 184 | 
| 185   // Start up a sync test server if one is needed and setup mock gaia responses. | 185   // Start up a sync test server if one is needed and setup mock gaia responses. | 
| 186   // Note: This must be done prior to the call to SetupClients() because we want | 186   // Note: This must be done prior to the call to SetupClients() because we want | 
| 187   // the mock gaia responses to be available before GaiaUrls is initialized. | 187   // the mock gaia responses to be available before GaiaUrls is initialized. | 
| 188   SetUpTestServerIfRequired(); | 188   SetUpTestServerIfRequired(); | 
| 189 | 189 | 
| 190   // Yield control back to the InProcessBrowserTest framework. | 190   // Yield control back to the InProcessBrowserTest framework. | 
| 191   InProcessBrowserTest::SetUp(); | 191   InProcessBrowserTest::SetUp(); | 
| 192 } | 192 } | 
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 865       BrowserThread::IO, FROM_HERE, | 865       BrowserThread::IO, FROM_HERE, | 
| 866       base::Bind(&SetProxyConfigCallback, &done, | 866       base::Bind(&SetProxyConfigCallback, &done, | 
| 867                  make_scoped_refptr(context_getter), proxy_config)); | 867                  make_scoped_refptr(context_getter), proxy_config)); | 
| 868   done.Wait(); | 868   done.Wait(); | 
| 869 } | 869 } | 
| 870 | 870 | 
| 871 void SyncTest::UseFakeServer() { | 871 void SyncTest::UseFakeServer() { | 
| 872   DCHECK_EQ(SERVER_TYPE_UNDECIDED, server_type_); | 872   DCHECK_EQ(SERVER_TYPE_UNDECIDED, server_type_); | 
| 873   server_type_ = IN_PROCESS_FAKE_SERVER; | 873   server_type_ = IN_PROCESS_FAKE_SERVER; | 
| 874 } | 874 } | 
| OLD | NEW | 
|---|