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

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

Issue 2815743002: Move a couple of blob tests next to the files they cover. (Closed)
Patch Set: Fix gn check, take 2. Created 3 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/sequenced_task_runner.h" 17 #include "base/sequenced_task_runner.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "base/test/test_simple_task_runner.h" 20 #include "base/test/test_simple_task_runner.h"
21 #include "content/browser/indexed_db/indexed_db_context_impl.h" 21 #include "content/browser/indexed_db/indexed_db_context_impl.h"
22 #include "content/browser/indexed_db/indexed_db_factory_impl.h" 22 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
23 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" 23 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
24 #include "content/browser/indexed_db/indexed_db_value.h" 24 #include "content/browser/indexed_db/indexed_db_value.h"
25 #include "content/browser/indexed_db/leveldb/leveldb_factory.h" 25 #include "content/browser/indexed_db/leveldb/leveldb_factory.h"
26 #include "content/browser/quota/mock_quota_manager_proxy.h" 26 #include "content/browser/quota/mock_quota_manager_proxy.h"
27 #include "content/public/test/mock_special_storage_policy.h"
28 #include "content/public/test/test_browser_thread_bundle.h" 27 #include "content/public/test/test_browser_thread_bundle.h"
29 #include "net/url_request/url_request_test_util.h" 28 #include "net/url_request/url_request_test_util.h"
30 #include "storage/browser/blob/blob_data_handle.h" 29 #include "storage/browser/blob/blob_data_handle.h"
31 #include "storage/browser/quota/special_storage_policy.h" 30 #include "storage/browser/quota/special_storage_policy.h"
31 #include "storage/browser/test/mock_special_storage_policy.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" 33 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
34 34
35 using base::ASCIIToUTF16; 35 using base::ASCIIToUTF16;
36 using url::Origin; 36 using url::Origin;
37 37
38 namespace content { 38 namespace content {
39 39
40 namespace { 40 namespace {
41 static const size_t kDefaultMaxOpenIteratorsPerDatabase = 50; 41 static const size_t kDefaultMaxOpenIteratorsPerDatabase = 50;
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1149
1150 // Dictionary, message key and more. 1150 // Dictionary, message key and more.
1151 ASSERT_TRUE(WriteFile(info_path, "{\"message\":\"foo\",\"bar\":5}")); 1151 ASSERT_TRUE(WriteFile(info_path, "{\"message\":\"foo\",\"bar\":5}"));
1152 EXPECT_TRUE( 1152 EXPECT_TRUE(
1153 IndexedDBBackingStore::ReadCorruptionInfo(path_base, origin, &message)); 1153 IndexedDBBackingStore::ReadCorruptionInfo(path_base, origin, &message));
1154 EXPECT_FALSE(PathExists(info_path)); 1154 EXPECT_FALSE(PathExists(info_path));
1155 EXPECT_EQ("foo", message); 1155 EXPECT_EQ("foo", message);
1156 } 1156 }
1157 1157
1158 } // namespace content 1158 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698