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

Unified Diff: net/http/http_stream_factory_impl_request_unittest.cc

Issue 1952423002: JobController 2: Remove reference between HttpStreamFactoryImpl::Jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Job_Controller_1
Patch Set: sync to JobController1, and move DoWaitForJob to JobController Created 4 years, 7 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_request_unittest.cc
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index 2bf13f731c325a15e35cec3f14925ca77f9a43c7..277b24ca84e0c669d00670a83b86c76e097a56a2 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -98,6 +98,7 @@ TEST_P(HttpStreamFactoryImplRequestTest, SetPriority) {
DEFAULT_PRIORITY, SSLConfig(), SSLConfig(), server, original_url, NULL);
job_controller->main_job_.reset(job);
job_controller->AttachJob(job);
+
EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
request.SetPriority(MEDIUM);
@@ -147,6 +148,7 @@ TEST_P(HttpStreamFactoryImplRequestTest, DelayMainJob) {
DEFAULT_PRIORITY, SSLConfig(), SSLConfig(), server, original_url, NULL);
job_controller->main_job_.reset(job);
job_controller->AttachJob(job);
+
EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
AlternativeService alternative_service(net::NPN_HTTP_2, server);
@@ -157,17 +159,17 @@ TEST_P(HttpStreamFactoryImplRequestTest, DelayMainJob) {
job_controller->alternative_job_.reset(alternative_job);
job_controller->AttachJob(alternative_job);
- job->WaitFor(alternative_job);
- EXPECT_EQ(HttpStreamFactoryImpl::Job::STATE_NONE, job->next_state_);
+ job_controller->blocking_ = true;
+ EXPECT_EQ(HttpStreamFactoryImpl::STATE_NONE, job->next_state_);
// Test |alternative_job| resuming the |job| after delay.
int wait_time = 1;
base::TimeDelta delay = base::TimeDelta::FromMilliseconds(wait_time);
- job->Resume(alternative_job, delay);
+ job_controller->MaybeResumeOtherJob(alternative_job, delay);
- // Verify |job| has |wait_time_| and there is no |blocking_job_|
+ // Verify |job| has |wait_time_| and there is no blocking job.
EXPECT_EQ(delay, job->wait_time_);
- EXPECT_TRUE(!job->blocking_job_);
+ EXPECT_TRUE(!job_controller->blocking());
// Start the |job| and verify |job|'s |wait_time_| is cleared.
job->Start(request.stream_type());
@@ -177,7 +179,7 @@ TEST_P(HttpStreamFactoryImplRequestTest, DelayMainJob) {
EXPECT_NE(delay, job->wait_time_);
EXPECT_TRUE(job->wait_time_.is_zero());
- EXPECT_EQ(HttpStreamFactoryImpl::Job::STATE_INIT_CONNECTION_COMPLETE,
+ EXPECT_EQ(HttpStreamFactoryImpl::STATE_INIT_CONNECTION_COMPLETE,
job->next_state_);
}
« 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