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

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

Issue 2855943003: Reduce the in-memory blob storgae limit on Android (Closed)
Patch Set: Fix IndexedDBBrowserTest. Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/test/data/indexeddb/blobs_use_quota.html » ('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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 ChromeBlobStorageContext::GetFor( 482 ChromeBlobStorageContext::GetFor(
483 shell()->web_contents()->GetBrowserContext()); 483 shell()->web_contents()->GetBrowserContext());
484 EXPECT_EQ(0UL, blob_context->context()->blob_count()); 484 EXPECT_EQ(0UL, blob_context->context()->blob_count());
485 } 485 }
486 486
487 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, BlobsCountAgainstQuota) { 487 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, BlobsCountAgainstQuota) {
488 SimpleTest(GetTestUrl("indexeddb", "blobs_use_quota.html")); 488 SimpleTest(GetTestUrl("indexeddb", "blobs_use_quota.html"));
489 } 489 }
490 490
491 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) { 491 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) {
492 SimpleTest(GetTestUrl("indexeddb", "write_20mb_blob.html")); 492 SimpleTest(GetTestUrl("indexeddb", "write_4mb_blob.html"));
jsbell 2017/05/04 22:11:37 If you wanted to get fancy we could make this para
ssid 2017/05/05 00:34:23 hm actually changing the file name causes the test
jsbell 2017/05/05 18:53:05 huh. It looked like we used that pattern elsewhere
493 int64_t size = RequestDiskUsage(); 493 int64_t size = RequestDiskUsage();
494 // This assertion assumes that we do not compress blobs. 494 // This assertion assumes that we do not compress blobs.
495 EXPECT_GT(size, 20 << 20 /* 20 MB */); 495 EXPECT_GT(size, 4 << 20 /* 4 MB */);
496 // TODO(jsbell): Remove static_cast<> when overloads are eliminated. 496 // TODO(jsbell): Remove static_cast<> when overloads are eliminated.
497 GetContext()->TaskRunner()->PostTask( 497 GetContext()->TaskRunner()->PostTask(
498 FROM_HERE, 498 FROM_HERE,
499 base::Bind(static_cast<void (IndexedDBContextImpl::*)(const GURL&)>( 499 base::Bind(static_cast<void (IndexedDBContextImpl::*)(const GURL&)>(
500 &IndexedDBContextImpl::DeleteForOrigin), 500 &IndexedDBContextImpl::DeleteForOrigin),
501 GetContext(), GURL("file:///"))); 501 GetContext(), GURL("file:///")));
502 scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( 502 scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
503 BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner())); 503 BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner()));
504 ASSERT_TRUE(helper->Run()); 504 ASSERT_TRUE(helper->Run());
505 EXPECT_EQ(0, RequestDiskUsage()); 505 EXPECT_EQ(0, RequestDiskUsage());
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 command_line->AppendSwitch(switches::kSingleProcess); 853 command_line->AppendSwitch(switches::kSingleProcess);
854 } 854 }
855 }; 855 };
856 856
857 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, 857 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess,
858 RenderThreadShutdownTest) { 858 RenderThreadShutdownTest) {
859 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); 859 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html"));
860 } 860 }
861 861
862 } // namespace content 862 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/indexeddb/blobs_use_quota.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698