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

Side by Side Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 924033003: IndexedDB: Ensure that blobs in unused prefetches are acked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak store name Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/child/indexed_db/webidbcursor_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 406 }
407 407
408 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, BlobDidAck) { 408 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, BlobDidAck) {
409 SimpleTest(GetTestUrl("indexeddb", "blob_did_ack.html")); 409 SimpleTest(GetTestUrl("indexeddb", "blob_did_ack.html"));
410 content::ChromeBlobStorageContext* blob_context = 410 content::ChromeBlobStorageContext* blob_context =
411 ChromeBlobStorageContext::GetFor( 411 ChromeBlobStorageContext::GetFor(
412 shell()->web_contents()->GetBrowserContext()); 412 shell()->web_contents()->GetBrowserContext());
413 EXPECT_EQ(0UL, blob_context->context()->blob_count()); 413 EXPECT_EQ(0UL, blob_context->context()->blob_count());
414 } 414 }
415 415
416 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed, BlobDidAckPrefetch) {
417 SimpleTest(GetTestUrl("indexeddb", "blob_did_ack_prefetch.html"));
418 content::ChromeBlobStorageContext* blob_context =
419 ChromeBlobStorageContext::GetFor(
420 shell()->web_contents()->GetBrowserContext());
421 EXPECT_EQ(0UL, blob_context->context()->blob_count());
422 }
423
416 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, BlobsCountAgainstQuota) { 424 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, BlobsCountAgainstQuota) {
417 SimpleTest(GetTestUrl("indexeddb", "blobs_use_quota.html")); 425 SimpleTest(GetTestUrl("indexeddb", "blobs_use_quota.html"));
418 } 426 }
419 427
420 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) { 428 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) {
421 SimpleTest(GetTestUrl("indexeddb", "write_20mb_blob.html")); 429 SimpleTest(GetTestUrl("indexeddb", "write_20mb_blob.html"));
422 int64 size = RequestDiskUsage(); 430 int64 size = RequestDiskUsage();
423 // This assertion assumes that we do not compress blobs. 431 // This assertion assumes that we do not compress blobs.
424 EXPECT_GT(size, 20 << 20 /* 20 MB */); 432 EXPECT_GT(size, 20 << 20 /* 20 MB */);
425 GetContext()->TaskRunner()->PostTask( 433 GetContext()->TaskRunner()->PostTask(
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 command_line->AppendSwitch(switches::kSingleProcess); 766 command_line->AppendSwitch(switches::kSingleProcess);
759 } 767 }
760 }; 768 };
761 769
762 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, 770 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess,
763 RenderThreadShutdownTest) { 771 RenderThreadShutdownTest) {
764 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); 772 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html"));
765 } 773 }
766 774
767 } // namespace content 775 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/indexed_db/webidbcursor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698