Chromium Code Reviews| Index: ios/chrome/app/application_delegate/app_state_unittest.mm |
| diff --git a/ios/chrome/app/application_delegate/app_state_unittest.mm b/ios/chrome/app/application_delegate/app_state_unittest.mm |
| index 76ae22903ce33f55aec6dda5349120666146d39c..c6d56bd93e7f764683bc1b040969efb18862426d 100644 |
| --- a/ios/chrome/app/application_delegate/app_state_unittest.mm |
| +++ b/ios/chrome/app/application_delegate/app_state_unittest.mm |
| @@ -37,7 +37,6 @@ |
| #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" |
| #include "ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h" |
| #import "ios/testing/ocmock_complex_type_helper.h" |
| -#include "ios/web/net/request_tracker_impl.h" |
| #include "ios/web/public/test/test_web_thread_bundle.h" |
| #include "testing/platform_test.h" |
| #import "third_party/ocmock/OCMock/OCMock.h" |
| @@ -288,45 +287,11 @@ class AppStateTest : public PlatformTest { |
| __block BOOL metrics_mediator_called_; |
| }; |
| -// TODO(crbug.com/585700): remove this. |
| -// Creates a requestTracker, needed for teardown. |
| -void createTracker(BOOL* created, base::Lock* lock) { |
| - web::RequestTrackerImpl::GetTrackerForRequestGroupID(@"test"); |
| - base::AutoLock scoped_lock(*lock); |
| - *created = YES; |
| -} |
| - |
| // Used to have a thread handling the closing of the IO threads. |
| class AppStateWithThreadTest : public PlatformTest { |
| protected: |
| AppStateWithThreadTest() |
| - : thread_bundle_(web::TestWebThreadBundle::REAL_IO_THREAD) { |
| - BOOL created = NO; |
| - base::Lock* lock = new base::Lock; |
| - |
| - web::WebThread::PostTask(web::WebThread::IO, FROM_HERE, |
| - base::Bind(&createTracker, &created, lock)); |
| - |
| - CFTimeInterval start = CACurrentMediaTime(); |
| - |
| - // Poll for at most 1s, waiting for the Tracker creation. |
| - while (1) { |
| - base::AutoLock scoped_lock(*lock); |
| - if (created) |
| - return; |
| - if (CACurrentMediaTime() - start > 1.0) { |
| - trackerCreationFailed(); |
| - return; |
| - } |
| - // Ensure that other threads have a chance to run even on a single-core |
| - // devices. |
| - pthread_yield_np(); |
| - } |
| - } |
| - |
| - void trackerCreationFailed() { |
| - FAIL() << "Tracker creation took too much time."; |
| - } |
| + : thread_bundle_(web::TestWebThreadBundle::REAL_IO_THREAD) {} |
|
sdefresne
2017/02/21 10:40:30
Can you try to not pass web::TestWebThreadBundle::
|
| private: |
| web::TestWebThreadBundle thread_bundle_; |