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

Unified Diff: net/url_request/url_request_quic_unittest.cc

Issue 2721933002: HttpCache::Transaction layer allowing parallel validation (Closed)
Patch Set: Rebased + test-only changes for fixing the new Push Cache Lookup failing unit tests Created 3 years, 8 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
Index: net/url_request/url_request_quic_unittest.cc
diff --git a/net/url_request/url_request_quic_unittest.cc b/net/url_request/url_request_quic_unittest.cc
index ff887060dc237ef08f542c8bd5efa3bfa3d17c65..8c3f560beee141af81234390bf6e54d50499df0f 100644
--- a/net/url_request/url_request_quic_unittest.cc
+++ b/net/url_request/url_request_quic_unittest.cc
@@ -305,15 +305,14 @@ TEST_F(URLRequestQuicTest, CancelPushIfCached) {
EXPECT_TRUE(entries[0].GetStringValue("push_url", &value));
EXPECT_EQ(value, push_url_1);
- // No net error code for this lookup transaction, the push is found.
- EXPECT_FALSE(entries[1].GetIntegerValue("net_error", &net_error));
-
- EXPECT_TRUE(entries[2].GetStringValue("push_url", &value));
+ EXPECT_TRUE(entries[1].GetStringValue("push_url", &value));
EXPECT_EQ(value, push_url_2);
// Net error code -400 is found for this lookup transaction, the push is not
// found in the cache.
- EXPECT_TRUE(entries[3].GetIntegerValue("net_error", &net_error));
+ EXPECT_TRUE(entries[2].GetIntegerValue("net_error", &net_error));
EXPECT_EQ(net_error, -400);
+ // No net error code for this lookup transaction, the push is found.
+ EXPECT_FALSE(entries[3].GetIntegerValue("net_error", &net_error));
// Verify the reset error count received on the server side.
EXPECT_LE(1u, GetRstErrorCountReceivedByServer(QUIC_STREAM_CANCELLED));
@@ -392,11 +391,13 @@ TEST_F(URLRequestQuicTest, CancelPushIfCached2) {
EXPECT_TRUE(entries[0].GetStringValue("push_url", &value));
EXPECT_EQ(value, push_url_1);
- // No net error code for this lookup transaction, the push is found.
- EXPECT_FALSE(entries[1].GetIntegerValue("net_error", &net_error));
- EXPECT_TRUE(entries[2].GetStringValue("push_url", &value));
+ EXPECT_TRUE(entries[1].GetStringValue("push_url", &value));
EXPECT_EQ(value, push_url_2);
+
+ // No net error code for this lookup transaction, the push is found.
+ EXPECT_FALSE(entries[2].GetIntegerValue("net_error", &net_error));
+
// No net error code for this lookup transaction, the push is found.
EXPECT_FALSE(entries[3].GetIntegerValue("net_error", &net_error));

Powered by Google App Engine
This is Rietveld 408576698