Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: net/http/http_stream_factory_impl_job_controller_unittest.cc

Issue 2625133006: Move the logic to cancel main job in OrphanUnboundJob when the alt job succeed while main job is bl… (Closed)
Patch Set: fix test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job_controller_unittest.cc
diff --git a/net/http/http_stream_factory_impl_job_controller_unittest.cc b/net/http/http_stream_factory_impl_job_controller_unittest.cc
index 4502399072ec21881d9a3794478a60b1ec3c6a53..d0b7fc0784db247a94a71c2801e352dbb6624ec1 100644
--- a/net/http/http_stream_factory_impl_job_controller_unittest.cc
+++ b/net/http/http_stream_factory_impl_job_controller_unittest.cc
@@ -371,8 +371,9 @@ TEST_F(HttpStreamFactoryImplJobControllerTest,
EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_));
}
-// Tests that if alt job succeeds and main job is blocked, |request_| completion
-// will clean up JobController. Regression test for crbug.com/678768.
+// Tests that if alt job succeeds and main job is blocked, main job should be
+// cancelled immediately. |request_| completion will clean up the JobController.
+// Regression test for crbug.com/678768.
TEST_F(HttpStreamFactoryImplJobControllerTest,
AltJobSucceedsMainJobBlockedControllerDestroyed) {
ProxyConfig proxy_config;
@@ -407,9 +408,8 @@ TEST_F(HttpStreamFactoryImplJobControllerTest,
.WillOnce(Invoke(DeleteHttpStreamPointer));
job_controller_->OnStreamReady(job_factory_.alternative_job(), SSLConfig());
- EXPECT_TRUE(job_controller_->main_job());
+ EXPECT_FALSE(job_controller_->main_job());
EXPECT_TRUE(job_controller_->alternative_job());
- EXPECT_TRUE(JobControllerPeer::main_job_is_blocked(job_controller_));
// Invoke OnRequestComplete() which should delete |job_controller_| from
// |factory_|.
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698