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

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

Issue 2368913003: Populate storage_unittests target. (Closed)
Patch Set: Removed unnecessary include from storage/browser/blob/blob_storage_context_unittest.cc. Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/test/test_simple_task_runner.h" 15 #include "base/test/test_simple_task_runner.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/threading/thread_task_runner_handle.h" 17 #include "base/threading/thread_task_runner_handle.h"
18 #include "content/browser/browser_thread_impl.h" 18 #include "content/browser/browser_thread_impl.h"
19 #include "content/browser/indexed_db/indexed_db_context_impl.h" 19 #include "content/browser/indexed_db/indexed_db_context_impl.h"
20 #include "content/browser/indexed_db/indexed_db_quota_client.h" 20 #include "content/browser/indexed_db/indexed_db_quota_client.h"
21 #include "content/browser/quota/mock_quota_manager.h"
22 #include "content/public/browser/storage_partition.h" 21 #include "content/public/browser/storage_partition.h"
23 #include "content/public/test/test_browser_context.h" 22 #include "content/public/test/test_browser_context.h"
24 #include "content/public/test/test_browser_thread_bundle.h" 23 #include "content/public/test/test_browser_thread_bundle.h"
24 #include "storage/browser/test/mock_quota_manager.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 // Declared to shorten the line lengths. 27 // Declared to shorten the line lengths.
28 static const storage::StorageType kTemp = storage::kStorageTypeTemporary; 28 static const storage::StorageType kTemp = storage::kStorageTypeTemporary;
29 static const storage::StorageType kPerm = storage::kStorageTypePersistent; 29 static const storage::StorageType kPerm = storage::kStorageTypePersistent;
30 30
31 namespace content { 31 namespace content {
32 32
33 // Base class for our test fixtures. 33 // Base class for our test fixtures.
34 class IndexedDBQuotaClientTest : public testing::Test { 34 class IndexedDBQuotaClientTest : public testing::Test {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp)); 238 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp));
239 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 239 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
240 240
241 storage::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA); 241 storage::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
242 EXPECT_EQ(storage::kQuotaStatusOk, delete_status); 242 EXPECT_EQ(storage::kQuotaStatusOk, delete_status);
243 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp)); 243 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
244 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 244 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
245 } 245 }
246 246
247 } // namespace content 247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory_unittest.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698