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/browser/indexed_db/mock_indexed_db_callbacks.h" | 5 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/threading/thread_task_runner_handle.h" | |
pwnall
2017/03/27 21:55:12
why?
dmurph
2017/03/29 18:40:24
Done.
| |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 MockIndexedDBCallbacks::MockIndexedDBCallbacks() | 14 MockIndexedDBCallbacks::MockIndexedDBCallbacks() |
14 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr), | 15 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr, nullptr), |
15 expect_connection_(true) {} | 16 expect_connection_(true) {} |
16 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) | 17 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) |
17 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr), | 18 : IndexedDBCallbacks(nullptr, url::Origin(), nullptr, nullptr), |
18 expect_connection_(expect_connection) {} | 19 expect_connection_(expect_connection) {} |
19 | 20 |
20 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { | 21 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { |
21 EXPECT_EQ(expect_connection_, !!connection_); | 22 EXPECT_EQ(expect_connection_, !!connection_); |
22 } | 23 } |
23 | 24 |
24 void MockIndexedDBCallbacks::OnSuccess() {} | 25 void MockIndexedDBCallbacks::OnSuccess() {} |
25 | 26 |
26 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} | 27 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} |
27 | 28 |
28 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} | 29 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} |
29 | 30 |
30 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} | 31 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} |
31 | 32 |
32 void MockIndexedDBCallbacks::OnSuccess( | 33 void MockIndexedDBCallbacks::OnSuccess( |
33 std::unique_ptr<IndexedDBConnection> connection, | 34 std::unique_ptr<IndexedDBConnection> connection, |
34 const IndexedDBDatabaseMetadata& metadata) { | 35 const IndexedDBDatabaseMetadata& metadata) { |
35 connection_ = std::move(connection); | 36 connection_ = std::move(connection); |
36 } | 37 } |
37 | 38 |
38 } // namespace content | 39 } // namespace content |
OLD | NEW |