OLD | NEW |
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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" | 10 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" |
11 #include "content/browser/indexed_db/indexed_db_value.h" | 11 #include "content/browser/indexed_db/indexed_db_value.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/WebKit/public/platform/WebIDBTypes.h" | 13 #include "third_party/WebKit/public/platform/WebIDBTypes.h" |
14 | 14 |
15 using base::ASCIIToUTF16; | 15 using base::ASCIIToUTF16; |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 class IndexedDBBackingStoreTest : public testing::Test { | 21 class IndexedDBBackingStoreTest : public testing::Test { |
22 public: | 22 public: |
23 IndexedDBBackingStoreTest() {} | 23 IndexedDBBackingStoreTest() {} |
24 virtual void SetUp() { | 24 virtual void SetUp() { |
25 const GURL origin("http://localhost:81"); | 25 const GURL origin("http://localhost:81"); |
26 backing_store_ = IndexedDBBackingStore::OpenInMemory(origin); | 26 backing_store_ = |
| 27 IndexedDBBackingStore::OpenInMemory(origin, NULL /* task_runner */); |
27 | 28 |
28 // useful keys and values during tests | 29 // useful keys and values during tests |
29 m_value1 = IndexedDBValue("value1", std::vector<IndexedDBBlobInfo>()); | 30 m_value1 = IndexedDBValue("value1", std::vector<IndexedDBBlobInfo>()); |
30 m_value2 = IndexedDBValue("value2", std::vector<IndexedDBBlobInfo>()); | 31 m_value2 = IndexedDBValue("value2", std::vector<IndexedDBBlobInfo>()); |
31 | 32 |
32 m_key1 = IndexedDBKey(99, blink::WebIDBKeyTypeNumber); | 33 m_key1 = IndexedDBKey(99, blink::WebIDBKeyTypeNumber); |
33 m_key2 = IndexedDBKey(ASCIIToUTF16("key2")); | 34 m_key2 = IndexedDBKey(ASCIIToUTF16("key2")); |
34 } | 35 } |
35 | 36 |
36 protected: | 37 protected: |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 EXPECT_EQ(index_name, index.name); | 313 EXPECT_EQ(index_name, index.name); |
313 EXPECT_EQ(index_key_path, index.key_path); | 314 EXPECT_EQ(index_key_path, index.key_path); |
314 EXPECT_EQ(unique, index.unique); | 315 EXPECT_EQ(unique, index.unique); |
315 EXPECT_EQ(multi_entry, index.multi_entry); | 316 EXPECT_EQ(multi_entry, index.multi_entry); |
316 } | 317 } |
317 } | 318 } |
318 | 319 |
319 } // namespace | 320 } // namespace |
320 | 321 |
321 } // namespace content | 322 } // namespace content |
OLD | NEW |