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

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

Issue 411393003: IndexedDB: Added MessageLoop to IndexedDBBackingStoreTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed assert Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/task_runner.h" 14 #include "base/task_runner.h"
15 #include "base/test/test_simple_task_runner.h" 15 #include "base/test/test_simple_task_runner.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/indexed_db_leveldb_coding.h" 18 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
19 #include "content/browser/indexed_db/indexed_db_value.h" 19 #include "content/browser/indexed_db/indexed_db_value.h"
20 #include "content/browser/indexed_db/leveldb/leveldb_factory.h" 20 #include "content/browser/indexed_db/leveldb/leveldb_factory.h"
21 #include "content/public/test/mock_special_storage_policy.h" 21 #include "content/public/test/mock_special_storage_policy.h"
22 #include "content/public/test/test_browser_thread_bundle.h"
22 #include "net/url_request/url_request_test_util.h" 23 #include "net/url_request/url_request_test_util.h"
23 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
24 #include "third_party/WebKit/public/platform/WebIDBTypes.h" 25 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
25 #include "webkit/browser/blob/blob_data_handle.h" 26 #include "webkit/browser/blob/blob_data_handle.h"
26 #include "webkit/browser/quota/special_storage_policy.h" 27 #include "webkit/browser/quota/special_storage_policy.h"
27 28
28 using base::ASCIIToUTF16; 29 using base::ASCIIToUTF16;
29 30
30 namespace content { 31 namespace content {
31 32
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Sample keys and values that are consistent. 341 // Sample keys and values that are consistent.
341 IndexedDBKey m_key1; 342 IndexedDBKey m_key1;
342 IndexedDBKey m_key2; 343 IndexedDBKey m_key2;
343 IndexedDBKey m_key3; 344 IndexedDBKey m_key3;
344 IndexedDBValue m_value1; 345 IndexedDBValue m_value1;
345 IndexedDBValue m_value2; 346 IndexedDBValue m_value2;
346 IndexedDBValue m_value3; 347 IndexedDBValue m_value3;
347 std::vector<IndexedDBBlobInfo> m_blob_info; 348 std::vector<IndexedDBBlobInfo> m_blob_info;
348 349
349 private: 350 private:
351 content::TestBrowserThreadBundle thread_bundle_;
352
350 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStoreTest); 353 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStoreTest);
351 }; 354 };
352 355
353 class TestCallback : public IndexedDBBackingStore::BlobWriteCallback { 356 class TestCallback : public IndexedDBBackingStore::BlobWriteCallback {
354 public: 357 public:
355 TestCallback() : called(false), succeeded(false) {} 358 TestCallback() : called(false), succeeded(false) {}
356 virtual void Run(bool succeeded_in) OVERRIDE { 359 virtual void Run(bool succeeded_in) OVERRIDE {
357 called = true; 360 called = true;
358 succeeded = succeeded_in; 361 succeeded = succeeded_in;
359 } 362 }
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 EXPECT_EQ(index_name, index.name); 966 EXPECT_EQ(index_name, index.name);
964 EXPECT_EQ(index_key_path, index.key_path); 967 EXPECT_EQ(index_key_path, index.key_path);
965 EXPECT_EQ(unique, index.unique); 968 EXPECT_EQ(unique, index.unique);
966 EXPECT_EQ(multi_entry, index.multi_entry); 969 EXPECT_EQ(multi_entry, index.multi_entry);
967 } 970 }
968 } 971 }
969 972
970 } // namespace 973 } // namespace
971 974
972 } // namespace content 975 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698