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

Unified Diff: net/http/http_response_info_unittest.cc

Issue 1039263002: //net changes for stale-while-revalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-remove-old-impl
Patch Set: Changes suggested by rvargas. Created 5 years, 4 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_response_info.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_response_info_unittest.cc
diff --git a/net/http/http_response_info_unittest.cc b/net/http/http_response_info_unittest.cc
index ef7d4118eac4368526805e1b881fc817d855c8b9..d27fb1c8ff7cd7bc84cc5d4c6ada44a181e1771f 100644
--- a/net/http/http_response_info_unittest.cc
+++ b/net/http/http_response_info_unittest.cc
@@ -52,6 +52,30 @@ TEST_F(HttpResponseInfoTest, UnusedSincePrefetchPersistTrue) {
EXPECT_TRUE(restored_response_info.unused_since_prefetch);
}
+TEST_F(HttpResponseInfoTest, AsyncRevalidationRequiredDefault) {
+ EXPECT_FALSE(response_info_.async_revalidation_required);
+}
+
+TEST_F(HttpResponseInfoTest, AsyncRevalidationRequiredCopy) {
+ response_info_.async_revalidation_required = true;
+ net::HttpResponseInfo response_info_clone(response_info_);
+ EXPECT_TRUE(response_info_clone.async_revalidation_required);
+}
+
+TEST_F(HttpResponseInfoTest, AsyncRevalidationRequiredAssign) {
+ response_info_.async_revalidation_required = true;
+ net::HttpResponseInfo response_info_clone;
+ response_info_clone = response_info_;
+ EXPECT_TRUE(response_info_clone.async_revalidation_required);
+}
+
+TEST_F(HttpResponseInfoTest, AsyncRevalidationRequiredNotPersisted) {
+ response_info_.async_revalidation_required = true;
+ net::HttpResponseInfo restored_response_info;
+ PickleAndRestore(response_info_, &restored_response_info);
+ EXPECT_FALSE(restored_response_info.async_revalidation_required);
+}
+
} // namespace
} // namespace net
« no previous file with comments | « net/http/http_response_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698