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

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

Issue 240003010: The chromium-side backchannel plumbing for blobs in IDB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged out Created 6 years, 8 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/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "content/child/indexed_db/indexed_db_dispatcher.h" 8 #include "content/child/indexed_db/indexed_db_dispatcher.h"
9 #include "content/child/indexed_db/webidbcursor_impl.h" 9 #include "content/child/indexed_db/webidbcursor_impl.h"
10 #include "content/child/thread_safe_sender.h" 10 #include "content/child/thread_safe_sender.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 EXPECT_TRUE(callbacks.error_seen()); 124 EXPECT_TRUE(callbacks.error_seen());
125 } 125 }
126 126
127 namespace { 127 namespace {
128 128
129 class CursorCallbacks : public WebIDBCallbacks { 129 class CursorCallbacks : public WebIDBCallbacks {
130 public: 130 public:
131 CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) : cursor_(cursor) {} 131 CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) : cursor_(cursor) {}
132 132
133 virtual void onSuccess(const WebData&) OVERRIDE {} 133 virtual void onSuccess(const WebData&,
134 const WebVector<WebBlobInfo>&) OVERRIDE {}
134 virtual void onSuccess(WebIDBCursor* cursor, 135 virtual void onSuccess(WebIDBCursor* cursor,
135 const WebIDBKey& key, 136 const WebIDBKey& key,
136 const WebIDBKey& primaryKey, 137 const WebIDBKey& primaryKey,
137 const WebData& value) OVERRIDE { 138 const WebData& value,
139 const WebVector<WebBlobInfo>&) OVERRIDE {
138 cursor_->reset(cursor); 140 cursor_->reset(cursor);
139 } 141 }
140 142
141 private: 143 private:
142 scoped_ptr<WebIDBCursor>* cursor_; 144 scoped_ptr<WebIDBCursor>* cursor_;
143 }; 145 };
144 146
145 } // namespace 147 } // namespace
146 148
147 TEST_F(IndexedDBDispatcherTest, CursorTransactionId) { 149 TEST_F(IndexedDBDispatcherTest, CursorTransactionId) {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 cursor1_transaction_id); 325 cursor1_transaction_id);
324 326
325 EXPECT_EQ(2, cursor1->reset_count()); 327 EXPECT_EQ(2, cursor1->reset_count());
326 EXPECT_EQ(0, cursor2->reset_count()); 328 EXPECT_EQ(0, cursor2->reset_count());
327 329
328 cursor1.reset(); 330 cursor1.reset();
329 cursor2.reset(); 331 cursor2.reset();
330 } 332 }
331 333
332 } // namespace content 334 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.cc ('k') | content/child/indexed_db/webidbcursor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698