| 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 "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/indexed_db_key_builders.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" |
| 11 #include "content/common/indexed_db/indexed_db_key.h" | 11 #include "content/common/indexed_db/indexed_db_key.h" |
| 12 #include "ipc/ipc_sync_message_filter.h" | 12 #include "ipc/ipc_sync_message_filter.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "third_party/WebKit/public/platform/WebData.h" | 14 #include "third_party/WebKit/public/platform/WebData.h" |
| 15 #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" | 15 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h
" |
| 16 | 16 |
| 17 using blink::WebBlobInfo; | 17 using blink::WebBlobInfo; |
| 18 using blink::WebData; | 18 using blink::WebData; |
| 19 using blink::WebIDBCallbacks; | 19 using blink::WebIDBCallbacks; |
| 20 using blink::WebIDBDatabase; | 20 using blink::WebIDBDatabase; |
| 21 using blink::WebIDBKey; | 21 using blink::WebIDBKey; |
| 22 using blink::WebIDBKeyTypeNumber; | 22 using blink::WebIDBKeyTypeNumber; |
| 23 using blink::WebVector; | 23 using blink::WebVector; |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // The real dispatcher would call cursor->CachedContinue(), so do that: | 321 // The real dispatcher would call cursor->CachedContinue(), so do that: |
| 322 scoped_ptr<WebIDBCallbacks> callbacks(new MockContinueCallbacks()); | 322 scoped_ptr<WebIDBCallbacks> callbacks(new MockContinueCallbacks()); |
| 323 cursor.CachedContinue(callbacks.get()); | 323 cursor.CachedContinue(callbacks.get()); |
| 324 | 324 |
| 325 // Now the cursor should have reset the rest of the cache. | 325 // Now the cursor should have reset the rest of the cache. |
| 326 EXPECT_EQ(1, dispatcher_->reset_calls()); | 326 EXPECT_EQ(1, dispatcher_->reset_calls()); |
| 327 EXPECT_EQ(1, dispatcher_->last_used_count()); | 327 EXPECT_EQ(1, dispatcher_->last_used_count()); |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace content | 330 } // namespace content |
| OLD | NEW |