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

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

Issue 19442002: Convert to new WebIDBTypes enums and accessors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content/common/DEPS Created 7 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 | Annotate | Revision Log
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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "content/browser/indexed_db/indexed_db_factory.h" 12 #include "content/browser/indexed_db/indexed_db_factory.h"
13 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" 13 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
15 #include "url/gurl.h" 16 #include "url/gurl.h"
16 #include "webkit/common/database/database_identifier.h" 17 #include "webkit/common/database/database_identifier.h"
17 18
18 using WebKit::WebIDBKey;
19
20 namespace content { 19 namespace content {
21 20
22 namespace { 21 namespace {
23 22
24 class IndexedDBBackingStoreTest : public testing::Test { 23 class IndexedDBBackingStoreTest : public testing::Test {
25 public: 24 public:
26 IndexedDBBackingStoreTest() {} 25 IndexedDBBackingStoreTest() {}
27 virtual void SetUp() { 26 virtual void SetUp() {
28 std::string file_identifier; 27 std::string file_identifier;
29 backing_store_ = IndexedDBBackingStore::OpenInMemory(file_identifier); 28 backing_store_ = IndexedDBBackingStore::OpenInMemory(file_identifier);
30 29
31 // useful keys and values during tests 30 // useful keys and values during tests
32 m_value1 = "value1"; 31 m_value1 = "value1";
33 m_value2 = "value2"; 32 m_value2 = "value2";
34 m_value3 = "value3"; 33 m_value3 = "value3";
35 m_key1 = IndexedDBKey(99, WebIDBKey::NumberType); 34 m_key1 = IndexedDBKey(99, WebKit::WebIDBKeyTypeNumber);
36 m_key2 = IndexedDBKey(ASCIIToUTF16("key2")); 35 m_key2 = IndexedDBKey(ASCIIToUTF16("key2"));
37 m_key3 = IndexedDBKey(ASCIIToUTF16("key3")); 36 m_key3 = IndexedDBKey(ASCIIToUTF16("key3"));
38 } 37 }
39 38
40 protected: 39 protected:
41 scoped_refptr<IndexedDBBackingStore> backing_store_; 40 scoped_refptr<IndexedDBBackingStore> backing_store_;
42 41
43 // Sample keys and values that are consistent. 42 // Sample keys and values that are consistent.
44 IndexedDBKey m_key1; 43 IndexedDBKey m_key1;
45 IndexedDBKey m_key2; 44 IndexedDBKey m_key2;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 409
411 GURL ok_origin("http://someorigin.com:82/"); 410 GURL ok_origin("http://someorigin.com:82/");
412 scoped_refptr<IndexedDBBackingStore> diskStore2 = 411 scoped_refptr<IndexedDBBackingStore> diskStore2 =
413 factory->TestOpenBackingStore(ok_origin, base_path); 412 factory->TestOpenBackingStore(ok_origin, base_path);
414 EXPECT_TRUE(diskStore2); 413 EXPECT_TRUE(diskStore2);
415 } 414 }
416 415
417 } // namespace 416 } // namespace
418 417
419 } // namespace content 418 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698