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 15de111c670934ab48b49b4eafd77880591a559f..1608512916053037bd0eb45fad3d7994f9363d37 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,10 @@ 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."; |
- } |
+ AppStateWithThreadTest() {} |
private: |
web::TestWebThreadBundle thread_bundle_; |