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/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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } // namespace | 61 } // namespace |
62 | 62 |
63 class IndexedDBDispatcherTest : public testing::Test { | 63 class IndexedDBDispatcherTest : public testing::Test { |
64 public: | 64 public: |
65 IndexedDBDispatcherTest() | 65 IndexedDBDispatcherTest() |
66 : message_loop_proxy_(base::MessageLoopProxy::current()), | 66 : message_loop_proxy_(base::MessageLoopProxy::current()), |
67 sync_message_filter_(new IPC::SyncMessageFilter(NULL)), | 67 sync_message_filter_(new IPC::SyncMessageFilter(NULL)), |
68 thread_safe_sender_(new ThreadSafeSender(message_loop_proxy_.get(), | 68 thread_safe_sender_(new ThreadSafeSender(message_loop_proxy_.get(), |
69 sync_message_filter_.get())) {} | 69 sync_message_filter_.get())) {} |
70 | 70 |
71 virtual void TearDown() override { | 71 void TearDown() override { blink::WebHeap::collectAllGarbageForTesting(); } |
72 blink::WebHeap::collectAllGarbageForTesting(); | |
73 } | |
74 | 72 |
75 protected: | 73 protected: |
76 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 74 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
77 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; | 75 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |
78 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 76 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
79 | 77 |
80 private: | 78 private: |
81 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcherTest); | 79 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcherTest); |
82 }; | 80 }; |
83 | 81 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 cursor1_transaction_id); | 340 cursor1_transaction_id); |
343 | 341 |
344 EXPECT_EQ(2, cursor1->reset_count()); | 342 EXPECT_EQ(2, cursor1->reset_count()); |
345 EXPECT_EQ(0, cursor2->reset_count()); | 343 EXPECT_EQ(0, cursor2->reset_count()); |
346 | 344 |
347 cursor1.reset(); | 345 cursor1.reset(); |
348 cursor2.reset(); | 346 cursor2.reset(); |
349 } | 347 } |
350 | 348 |
351 } // namespace content | 349 } // namespace content |
OLD | NEW |