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

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

Issue 16581002: IndexedDB: Eliminate interfaces for IndexedDB{Factory,Database,Cursor} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks_wrapper.h » ('j') | 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/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/string16.h" 10 #include "base/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_impl.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/Source/WebKit/chromium/public/WebSecurityOrigin.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
16 #include "third_party/WebKit/public/platform/WebData.h" 16 #include "third_party/WebKit/public/platform/WebData.h"
17 17
18 using WebKit::WebSecurityOrigin; 18 using WebKit::WebSecurityOrigin;
19 using WebKit::WebIDBKey; 19 using WebKit::WebIDBKey;
20 20
21 namespace content { 21 namespace content {
22 22
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 EXPECT_EQ(1UL, object_store.indexes.size()); 321 EXPECT_EQ(1UL, object_store.indexes.size());
322 IndexedDBIndexMetadata index = object_store.indexes[index_id]; 322 IndexedDBIndexMetadata index = object_store.indexes[index_id];
323 EXPECT_EQ(index_name, index.name); 323 EXPECT_EQ(index_name, index.name);
324 EXPECT_EQ(index_key_path, index.key_path); 324 EXPECT_EQ(index_key_path, index.key_path);
325 EXPECT_EQ(unique, index.unique); 325 EXPECT_EQ(unique, index.unique);
326 EXPECT_EQ(multi_entry, index.multi_entry); 326 EXPECT_EQ(multi_entry, index.multi_entry);
327 } 327 }
328 } 328 }
329 329
330 class MockIDBFactory : public IndexedDBFactoryImpl { 330 class MockIDBFactory : public IndexedDBFactory {
331 public: 331 public:
332 static scoped_refptr<MockIDBFactory> Create() { 332 static scoped_refptr<MockIDBFactory> Create() {
333 return make_scoped_refptr(new MockIDBFactory()); 333 return make_scoped_refptr(new MockIDBFactory());
334 } 334 }
335 335
336 scoped_refptr<IndexedDBBackingStore> TestOpenBackingStore( 336 scoped_refptr<IndexedDBBackingStore> TestOpenBackingStore(
337 const WebSecurityOrigin& origin, 337 const WebSecurityOrigin& origin,
338 const base::FilePath& data_directory) { 338 const base::FilePath& data_directory) {
339 return OpenBackingStore(origin.databaseIdentifier(), data_directory); 339 return OpenBackingStore(origin.databaseIdentifier(), data_directory);
340 } 340 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 WebSecurityOrigin ok_origin = 423 WebSecurityOrigin ok_origin =
424 WebSecurityOrigin::createFromString("http://someorigin.com:82/"); 424 WebSecurityOrigin::createFromString("http://someorigin.com:82/");
425 scoped_refptr<IndexedDBBackingStore> diskStore2 = 425 scoped_refptr<IndexedDBBackingStore> diskStore2 =
426 factory->TestOpenBackingStore(ok_origin, base_path); 426 factory->TestOpenBackingStore(ok_origin, base_path);
427 EXPECT_TRUE(diskStore2); 427 EXPECT_TRUE(diskStore2);
428 } 428 }
429 429
430 } // namespace 430 } // namespace
431 431
432 } // namespace content 432 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698