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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #include "net/base/load_flags.h" | 82 #include "net/base/load_flags.h" |
83 #include "net/base/network_change_notifier.h" | 83 #include "net/base/network_change_notifier.h" |
84 #include "net/base/port_util.h" | 84 #include "net/base/port_util.h" |
85 #include "net/url_request/test_url_fetcher_factory.h" | 85 #include "net/url_request/test_url_fetcher_factory.h" |
86 #include "net/url_request/url_fetcher.h" | 86 #include "net/url_request/url_fetcher.h" |
87 #include "net/url_request/url_fetcher_delegate.h" | 87 #include "net/url_request/url_fetcher_delegate.h" |
88 #include "url/gurl.h" | 88 #include "url/gurl.h" |
89 | 89 |
90 #if defined(OS_CHROMEOS) | 90 #if defined(OS_CHROMEOS) |
91 #include "chromeos/chromeos_switches.h" | 91 #include "chromeos/chromeos_switches.h" |
| 92 #include "components/arc/arc_util.h" |
92 #endif | 93 #endif |
93 | 94 |
94 using browser_sync::ProfileSyncService; | 95 using browser_sync::ProfileSyncService; |
95 using content::BrowserThread; | 96 using content::BrowserThread; |
96 | 97 |
97 namespace switches { | 98 namespace switches { |
98 const char kPasswordFileForTest[] = "password-file-for-test"; | 99 const char kPasswordFileForTest[] = "password-file-for-test"; |
99 const char kSyncUserForTest[] = "sync-user-for-test"; | 100 const char kSyncUserForTest[] = "sync-user-for-test"; |
100 const char kSyncPasswordForTest[] = "sync-password-for-test"; | 101 const char kSyncPasswordForTest[] = "sync-password-for-test"; |
101 const char kSyncServerCommandLine[] = "sync-server-command-line"; | 102 const char kSyncServerCommandLine[] = "sync-server-command-line"; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 291 |
291 fake_server_.reset(); | 292 fake_server_.reset(); |
292 } | 293 } |
293 | 294 |
294 void SyncTest::SetUpCommandLine(base::CommandLine* cl) { | 295 void SyncTest::SetUpCommandLine(base::CommandLine* cl) { |
295 AddTestSwitches(cl); | 296 AddTestSwitches(cl); |
296 AddOptionalTypesToCommandLine(cl); | 297 AddOptionalTypesToCommandLine(cl); |
297 | 298 |
298 #if defined(OS_CHROMEOS) | 299 #if defined(OS_CHROMEOS) |
299 cl->AppendSwitch(chromeos::switches::kIgnoreUserProfileMappingForTests); | 300 cl->AppendSwitch(chromeos::switches::kIgnoreUserProfileMappingForTests); |
| 301 arc::SetArcAvailableCommandLineForTesting(cl); |
300 #endif | 302 #endif |
301 } | 303 } |
302 | 304 |
303 void SyncTest::AddTestSwitches(base::CommandLine* cl) { | 305 void SyncTest::AddTestSwitches(base::CommandLine* cl) { |
304 // Disable non-essential access of external network resources. | 306 // Disable non-essential access of external network resources. |
305 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) | 307 if (!cl->HasSwitch(switches::kDisableBackgroundNetworking)) |
306 cl->AppendSwitch(switches::kDisableBackgroundNetworking); | 308 cl->AppendSwitch(switches::kDisableBackgroundNetworking); |
307 | 309 |
308 if (!cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) | 310 if (!cl->HasSwitch(switches::kSyncShortInitialRetryOverride)) |
309 cl->AppendSwitch(switches::kSyncShortInitialRetryOverride); | 311 cl->AppendSwitch(switches::kSyncShortInitialRetryOverride); |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 | 1131 |
1130 void SyncTest::TriggerSyncForModelTypes(int index, | 1132 void SyncTest::TriggerSyncForModelTypes(int index, |
1131 syncer::ModelTypeSet model_types) { | 1133 syncer::ModelTypeSet model_types) { |
1132 GetSyncService(index)->TriggerRefresh(model_types); | 1134 GetSyncService(index)->TriggerRefresh(model_types); |
1133 } | 1135 } |
1134 | 1136 |
1135 void SyncTest::SetPreexistingPreferencesFileContents( | 1137 void SyncTest::SetPreexistingPreferencesFileContents( |
1136 const std::string& contents) { | 1138 const std::string& contents) { |
1137 preexisting_preferences_file_contents_ = contents; | 1139 preexisting_preferences_file_contents_ = contents; |
1138 } | 1140 } |
OLD | NEW |