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

Unified Diff: net/http/http_cache_unittest.cc

Issue 21369: Use RevocableStore to isolate the http cache from its transactions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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_cache.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_cache_unittest.cc
===================================================================
--- net/http/http_cache_unittest.cc (revision 9641)
+++ net/http/http_cache_unittest.cc (working copy)
@@ -1088,3 +1088,12 @@
rv = callback.WaitForResult();
ASSERT_EQ(net::ERR_CACHE_MISS, rv);
}
+
+// Ensure that we don't crash by if left-behind transactions.
+TEST(HttpCache, OutlivedTransactions) {
+ MockHttpCache* cache = new MockHttpCache;
+
+ net::HttpTransaction* trans = cache->http_cache()->CreateTransaction();
+ delete cache;
+ delete trans;
+}
« no previous file with comments | « net/http/http_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698