OLD | NEW |
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 "content/child/indexed_db/webidbcursor_impl.h" | 5 #include "content/child/indexed_db/webidbcursor_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 *web_blob_info_ = value.webBlobInfo; | 117 *web_blob_info_ = value.webBlobInfo; |
118 } | 118 } |
119 | 119 |
120 private: | 120 private: |
121 IndexedDBKey* key_; | 121 IndexedDBKey* key_; |
122 WebVector<WebBlobInfo>* web_blob_info_; | 122 WebVector<WebBlobInfo>* web_blob_info_; |
123 }; | 123 }; |
124 | 124 |
125 class MockSyncMessageFilter : public IPC::SyncMessageFilter { | 125 class MockSyncMessageFilter : public IPC::SyncMessageFilter { |
126 public: | 126 public: |
127 MockSyncMessageFilter() | 127 MockSyncMessageFilter() : SyncMessageFilter(nullptr) {} |
128 : SyncMessageFilter(nullptr, false /* is_channel_send_thread_safe */) {} | |
129 | 128 |
130 private: | 129 private: |
131 ~MockSyncMessageFilter() override {} | 130 ~MockSyncMessageFilter() override {} |
132 }; | 131 }; |
133 | 132 |
134 } // namespace | 133 } // namespace |
135 | 134 |
136 class WebIDBCursorImplTest : public testing::Test { | 135 class WebIDBCursorImplTest : public testing::Test { |
137 public: | 136 public: |
138 WebIDBCursorImplTest() { | 137 WebIDBCursorImplTest() { |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // The real dispatcher would call cursor->CachedContinue(), so do that: | 330 // The real dispatcher would call cursor->CachedContinue(), so do that: |
332 MockContinueCallbacks callbacks; | 331 MockContinueCallbacks callbacks; |
333 cursor.CachedContinue(&callbacks); | 332 cursor.CachedContinue(&callbacks); |
334 | 333 |
335 // Now the cursor should have reset the rest of the cache. | 334 // Now the cursor should have reset the rest of the cache. |
336 EXPECT_EQ(1, dispatcher_->reset_calls()); | 335 EXPECT_EQ(1, dispatcher_->reset_calls()); |
337 EXPECT_EQ(1, dispatcher_->last_used_count()); | 336 EXPECT_EQ(1, dispatcher_->last_used_count()); |
338 } | 337 } |
339 | 338 |
340 } // namespace content | 339 } // namespace content |
OLD | NEW |