Index: net/url_request/url_request_http_job_unittest.cc |
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc |
index 96e82bf6ae46c830a13f36e5dbee293f765e98a1..8df050202747c2ac1dab89c5248abd3b6ba52b34 100644 |
--- a/net/url_request/url_request_http_job_unittest.cc |
+++ b/net/url_request/url_request_http_job_unittest.cc |
@@ -391,6 +391,26 @@ |
EXPECT_EQ(HIGHEST, network_layer_.last_transaction()->priority()); |
} |
+// Make sure that URLRequestHttpJob passes on its priority updates to |
+// newly-created transactions after the first one. |
+TEST_F(URLRequestHttpJobTest, SetSubsequentTransactionPriority) { |
+ scoped_refptr<TestURLRequestHttpJob> job( |
+ new TestURLRequestHttpJob(req_.get())); |
+ job->Start(); |
+ |
+ job->SetPriority(LOW); |
+ ASSERT_TRUE(network_layer_.last_transaction()); |
+ EXPECT_EQ(LOW, network_layer_.last_transaction()->priority()); |
+ |
+ job->Kill(); |
+ network_layer_.ClearLastTransaction(); |
+ |
+ // Creates a second transaction. |
+ job->Start(); |
+ ASSERT_TRUE(network_layer_.last_transaction()); |
+ EXPECT_EQ(LOW, network_layer_.last_transaction()->priority()); |
+} |
+ |
// Confirm we do advertise SDCH encoding in the case of a GET. |
TEST_F(URLRequestHttpJobTest, SdchAdvertisementGet) { |
EnableSdch(); |