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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 1866483002: Add a new priority level, THROTTLED, below IDLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated comments. 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
« net/quic/quic_http_utils_test.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 512e5cfa354149eca25b4f6c3bd76885e0838f33..9ccc3eeae01afe655fda501a3201391e84a3b8cd 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -7907,6 +7907,21 @@ TEST_F(URLRequestTestHTTP, NetworkAccessedClearOnLoadOnlyFromCache) {
EXPECT_FALSE(req->response_info().network_accessed);
}
+// Test that a single job with a throttled priority completes
+// correctly in the absence of contention.
+TEST_F(URLRequestTestHTTP, ThrottledPriority) {
+ ASSERT_TRUE(http_test_server()->Start());
+
+ TestDelegate d;
+ GURL test_url(http_test_server()->GetURL("/"));
+ std::unique_ptr<URLRequest> req(
+ default_context_.CreateRequest(test_url, THROTTLED, &d));
+ req->Start();
+ base::RunLoop().Run();
+
+ EXPECT_TRUE(req->status().is_success());
+}
+
class URLRequestInterceptorTestHTTP : public URLRequestTestHTTP {
public:
// TODO(bengr): Merge this with the URLRequestInterceptorHTTPTest fixture,
« net/quic/quic_http_utils_test.cc ('K') | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698