Index: content/browser/loader/resource_loader_unittest.cc |
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc |
index 7a65e17369c3a6dbf3e5b801f9c8c0e179be421e..7aade9492a10ee8d1035e7f61a0dec735f9f530a 100644 |
--- a/content/browser/loader/resource_loader_unittest.cc |
+++ b/content/browser/loader/resource_loader_unittest.cc |
@@ -924,14 +924,7 @@ TEST_F(ResourceLoaderTest, SyncCancelOnReadCompleted) { |
EXPECT_LT(0u, raw_ptr_resource_handler_->body().size()); |
} |
-// This test is broken because ResourceLoader assumes when |
-// URLRequest::was_pending() is false, canceling the request will not result in |
-// a completion notification. This isn't the case - whether or not there's a |
-// notification depends on whether URLRequestJob::NotifyDone() has been invoked |
-// yet - something the URLRequest doesn't even know about, itself. As a result, |
-// the ResourceLoader is notified of cancellation twice. |
-// TODO(mmenke): Fix this. |
-TEST_F(ResourceLoaderTest, DISABLED_SyncCancelOnReceivedEof) { |
+TEST_F(ResourceLoaderTest, SyncCancelOnReceivedEof) { |
raw_ptr_resource_handler_->set_on_on_read_eof_result(false); |
loader_->StartRequest(); |
@@ -1024,10 +1017,6 @@ TEST_F(ResourceLoaderTest, AsyncCancelOnReceivedEof) { |
loader_->StartRequest(); |
raw_ptr_resource_handler_->WaitUntilDeferred(); |
- // Have to spin the message loop for the test to pass - see comment on sync |
- // version of this test for explanation. |
- // TODO(mmenke): Remove this line once that's fixed. |
- base::RunLoop().RunUntilIdle(); |
raw_ptr_resource_handler_->CancelWithError(net::ERR_FAILED); |
base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(1, did_receive_response_); |