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

Side by Side Diff: content/child/indexed_db/proxy_webidbcursor_impl_unittest.cc

Issue 19752007: Use builders to convert between WebKit and content IDB types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/values.h" 6 #include "base/values.h"
7 #include "content/child/indexed_db/indexed_db_dispatcher.h" 7 #include "content/child/indexed_db/indexed_db_dispatcher.h"
8 #include "content/child/indexed_db/indexed_db_key_builders.h"
8 #include "content/child/indexed_db/proxy_webidbcursor_impl.h" 9 #include "content/child/indexed_db/proxy_webidbcursor_impl.h"
9 #include "content/child/thread_safe_sender.h" 10 #include "content/child/thread_safe_sender.h"
10 #include "content/common/indexed_db/indexed_db_key.h" 11 #include "content/common/indexed_db/indexed_db_key.h"
11 #include "ipc/ipc_sync_message_filter.h" 12 #include "ipc/ipc_sync_message_filter.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/WebKit/public/platform/WebData.h" 14 #include "third_party/WebKit/public/platform/WebData.h"
14 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" 15 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h"
15 16
16 using WebKit::WebData; 17 using WebKit::WebData;
17 using WebKit::WebIDBCallbacks; 18 using WebKit::WebIDBCallbacks;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 67
67 class MockContinueCallbacks : public WebIDBCallbacks { 68 class MockContinueCallbacks : public WebIDBCallbacks {
68 public: 69 public:
69 MockContinueCallbacks(IndexedDBKey* key = 0) : key_(key) {} 70 MockContinueCallbacks(IndexedDBKey* key = 0) : key_(key) {}
70 71
71 virtual void onSuccess(const WebIDBKey& key, 72 virtual void onSuccess(const WebIDBKey& key,
72 const WebIDBKey& primaryKey, 73 const WebIDBKey& primaryKey,
73 const WebData& value) { 74 const WebData& value) {
74 75
75 if (key_) 76 if (key_)
76 *key_ = IndexedDBKey(key); 77 *key_ = IndexedDBKeyBuilder::Build(key);
77 } 78 }
78 79
79 private: 80 private:
80 IndexedDBKey* key_; 81 IndexedDBKey* key_;
81 }; 82 };
82 83
83 } // namespace 84 } // namespace
84 85
85 TEST(RendererWebIDBCursorImplTest, PrefetchTest) { 86 TEST(RendererWebIDBCursorImplTest, PrefetchTest) {
86 87
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 EXPECT_EQ(expected_key++, key.number()); 154 EXPECT_EQ(expected_key++, key.number());
154 } 155 }
155 } 156 }
156 } 157 }
157 158
158 EXPECT_EQ(dispatcher.destroyed_cursor_id(), 159 EXPECT_EQ(dispatcher.destroyed_cursor_id(),
159 RendererWebIDBCursorImpl::kInvalidCursorId); 160 RendererWebIDBCursorImpl::kInvalidCursorId);
160 } 161 }
161 162
162 } // namespace content 163 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/proxy_webidbcursor_impl.cc ('k') | content/child/indexed_db/proxy_webidbdatabase_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698