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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/indexed_db/indexed_db_connection.h" 10 #include "content/browser/indexed_db/indexed_db_connection.h"
11 #include "content/browser/indexed_db/indexed_db_context_impl.h" 11 #include "content/browser/indexed_db/indexed_db_context_impl.h"
12 #include "content/browser/indexed_db/indexed_db_factory_impl.h" 12 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
13 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" 13 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h"
14 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h" 14 #include "content/browser/indexed_db/mock_indexed_db_database_callbacks.h"
15 #include "content/public/browser/storage_partition.h" 15 #include "content/public/browser/storage_partition.h"
16 #include "content/public/common/url_constants.h" 16 #include "content/public/common/url_constants.h"
17 #include "content/public/test/mock_special_storage_policy.h" 17 #include "content/public/test/mock_special_storage_policy.h"
18 #include "content/public/test/test_browser_context.h" 18 #include "content/public/test/test_browser_context.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "webkit/browser/quota/quota_manager.h" 20 #include "storage/browser/quota/quota_manager.h"
21 #include "webkit/browser/quota/special_storage_policy.h" 21 #include "storage/browser/quota/special_storage_policy.h"
22 #include "webkit/common/database/database_identifier.h" 22 #include "storage/common/database/database_identifier.h"
23 23
24 namespace content { 24 namespace content {
25 25
26 class IndexedDBTest : public testing::Test { 26 class IndexedDBTest : public testing::Test {
27 public: 27 public:
28 const GURL kNormalOrigin; 28 const GURL kNormalOrigin;
29 const GURL kSessionOnlyOrigin; 29 const GURL kSessionOnlyOrigin;
30 30
31 IndexedDBTest() 31 IndexedDBTest()
32 : kNormalOrigin("http://normal/"), 32 : kNormalOrigin("http://normal/"),
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 // Simulate the write failure. 277 // Simulate the write failure.
278 leveldb::Status status = leveldb::Status::IOError("Simulated failure"); 278 leveldb::Status status = leveldb::Status::IOError("Simulated failure");
279 callbacks->connection()->database()->TransactionCommitFailed(status); 279 callbacks->connection()->database()->TransactionCommitFailed(status);
280 280
281 EXPECT_TRUE(db_callbacks->forced_close_called()); 281 EXPECT_TRUE(db_callbacks->forced_close_called());
282 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin)); 282 EXPECT_FALSE(factory->IsBackingStoreOpen(kTestOrigin));
283 } 283 }
284 284
285 } // namespace content 285 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698