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