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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // Because clients may modify sync data as part of startup (for example local | 328 // Because clients may modify sync data as part of startup (for example local |
329 // session-releated data is rewritten), we need to ensure all startup-based | 329 // session-releated data is rewritten), we need to ensure all startup-based |
330 // changes have propagated between the clients. | 330 // changes have propagated between the clients. |
331 AwaitQuiescence(); | 331 AwaitQuiescence(); |
332 | 332 |
333 // The number of default entries is the number of entries existing after | 333 // The number of default entries is the number of entries existing after |
334 // sync startup excluding top level folders and other permanent items. | 334 // sync startup excluding top level folders and other permanent items. |
335 // This value must be updated whenever new permanent items are added (although | 335 // This value must be updated whenever new permanent items are added (although |
336 // this should handle new datatype-specific top level folders). | 336 // this should handle new datatype-specific top level folders). |
337 number_of_default_sync_items_ = GetClient(0)->GetNumEntries() - | 337 number_of_default_sync_items_ = GetClient(0)->GetNumEntries() - |
338 GetClient(0)->GetNumDatatypes() - 7; | 338 GetClient(0)->GetNumDatatypes() - 6; |
339 DVLOG(1) << "Setting " << number_of_default_sync_items_ << " as default " | 339 DVLOG(1) << "Setting " << number_of_default_sync_items_ << " as default " |
340 << " number of entries."; | 340 << " number of entries."; |
341 | 341 |
342 return true; | 342 return true; |
343 } | 343 } |
344 | 344 |
345 void SyncTest::CleanUpOnMainThread() { | 345 void SyncTest::CleanUpOnMainThread() { |
346 // Close all browser windows. | 346 // Close all browser windows. |
347 browser::CloseAllBrowsers(); | 347 browser::CloseAllBrowsers(); |
348 ui_test_utils::RunAllPendingInMessageLoop(); | 348 ui_test_utils::RunAllPendingInMessageLoop(); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 786 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
787 const net::ProxyConfig& proxy_config) { | 787 const net::ProxyConfig& proxy_config) { |
788 base::WaitableEvent done(false, false); | 788 base::WaitableEvent done(false, false); |
789 BrowserThread::PostTask( | 789 BrowserThread::PostTask( |
790 BrowserThread::IO, FROM_HERE, | 790 BrowserThread::IO, FROM_HERE, |
791 base::Bind(&SetProxyConfigCallback, &done, | 791 base::Bind(&SetProxyConfigCallback, &done, |
792 make_scoped_refptr(context_getter), proxy_config)); | 792 make_scoped_refptr(context_getter), proxy_config)); |
793 done.Wait(); | 793 done.Wait(); |
794 } | 794 } |
OLD | NEW |