Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |