| 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // Tests that don't use self-notifications can't await quiescense. They'll | 464 // Tests that don't use self-notifications can't await quiescense. They'll |
| 465 // have to find their own way of waiting for an initial state if they really | 465 // have to find their own way of waiting for an initial state if they really |
| 466 // need such guarantees. | 466 // need such guarantees. |
| 467 if (TestUsesSelfNotifications()) { | 467 if (TestUsesSelfNotifications()) { |
| 468 AwaitQuiescence(); | 468 AwaitQuiescence(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 return true; | 471 return true; |
| 472 } | 472 } |
| 473 | 473 |
| 474 void SyncTest::CleanUpOnMainThread() { | 474 void SyncTest::TearDownOnMainThread() { |
| 475 for (size_t i = 0; i < clients_.size(); ++i) { | 475 for (size_t i = 0; i < clients_.size(); ++i) { |
| 476 clients_[i]->service()->DisableForUser(); | 476 clients_[i]->service()->DisableForUser(); |
| 477 } | 477 } |
| 478 | 478 |
| 479 // Some of the pending messages might rely on browser windows still being | 479 // Some of the pending messages might rely on browser windows still being |
| 480 // around, so run messages both before and after closing all browsers. | 480 // around, so run messages both before and after closing all browsers. |
| 481 content::RunAllPendingInMessageLoop(); | 481 content::RunAllPendingInMessageLoop(); |
| 482 // Close all browser windows. | 482 // Close all browser windows. |
| 483 chrome::CloseAllBrowsers(); | 483 chrome::CloseAllBrowsers(); |
| 484 content::RunAllPendingInMessageLoop(); | 484 content::RunAllPendingInMessageLoop(); |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 BrowserThread::PostTask( | 1048 BrowserThread::PostTask( |
| 1049 BrowserThread::IO, FROM_HERE, | 1049 BrowserThread::IO, FROM_HERE, |
| 1050 base::Bind(&SetProxyConfigCallback, &done, | 1050 base::Bind(&SetProxyConfigCallback, &done, |
| 1051 make_scoped_refptr(context_getter), proxy_config)); | 1051 make_scoped_refptr(context_getter), proxy_config)); |
| 1052 done.Wait(); | 1052 done.Wait(); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 fake_server::FakeServer* SyncTest::GetFakeServer() const { | 1055 fake_server::FakeServer* SyncTest::GetFakeServer() const { |
| 1056 return fake_server_.get(); | 1056 return fake_server_.get(); |
| 1057 } | 1057 } |
| OLD | NEW |