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

Side by Side Diff: content/browser/indexed_db/indexed_db_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) 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/test/test_simple_task_runner.h" 13 #include "base/test/test_simple_task_runner.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "content/browser/indexed_db/indexed_db_connection.h" 15 #include "content/browser/indexed_db/indexed_db_connection.h"
16 #include "content/browser/indexed_db/indexed_db_context_impl.h" 16 #include "content/browser/indexed_db/indexed_db_context_impl.h"
17 #include "content/browser/indexed_db/indexed_db_factory_impl.h" 17 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
18 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" 18 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h"
19 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h" 19 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h"
20 #include "content/browser/quota/mock_quota_manager_proxy.h" 20 #include "content/browser/quota/mock_quota_manager_proxy.h"
21 #include "content/public/browser/storage_partition.h" 21 #include "content/public/browser/storage_partition.h"
22 #include "content/public/common/url_constants.h" 22 #include "content/public/common/url_constants.h"
23 #include "content/public/test/mock_special_storage_policy.h"
24 #include "content/public/test/test_browser_context.h" 23 #include "content/public/test/test_browser_context.h"
25 #include "content/public/test/test_browser_thread_bundle.h" 24 #include "content/public/test/test_browser_thread_bundle.h"
26 #include "storage/browser/quota/quota_manager.h" 25 #include "storage/browser/quota/quota_manager.h"
27 #include "storage/browser/quota/special_storage_policy.h" 26 #include "storage/browser/quota/special_storage_policy.h"
27 #include "storage/browser/test/mock_special_storage_policy.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 #include "url/origin.h" 29 #include "url/origin.h"
30 30
31 using url::Origin; 31 using url::Origin;
32 32
33 namespace content { 33 namespace content {
34 34
35 class IndexedDBTest : public testing::Test { 35 class IndexedDBTest : public testing::Test {
36 public: 36 public:
37 const Origin kNormalOrigin; 37 const Origin kNormalOrigin;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // Simulate the write failure. 281 // Simulate the write failure.
282 leveldb::Status status = leveldb::Status::IOError("Simulated failure"); 282 leveldb::Status status = leveldb::Status::IOError("Simulated failure");
283 context->GetIDBFactory()->HandleBackingStoreFailure(kTestOrigin); 283 context->GetIDBFactory()->HandleBackingStoreFailure(kTestOrigin);
284 284
285 EXPECT_TRUE(db_callbacks->forced_close_called()); 285 EXPECT_TRUE(db_callbacks->forced_close_called());
286 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin)); 286 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin));
287 } 287 }
288 288
289 } // namespace content 289 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698