OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" | |
6 | |
7 #include <utility> | |
8 | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 namespace content { | |
12 | |
13 MockIndexedDBCallbacks::MockIndexedDBCallbacks() | |
14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {} | |
15 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) | |
16 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {} | |
17 | |
18 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { | |
19 EXPECT_EQ(expect_connection_, !!connection_); | |
20 } | |
21 | |
22 void MockIndexedDBCallbacks::OnSuccess() {} | |
23 | |
24 void MockIndexedDBCallbacks::OnSuccess(int64_t result) {} | |
25 | |
26 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} | |
27 | |
28 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {} | |
29 | |
30 void MockIndexedDBCallbacks::OnSuccess( | |
31 std::unique_ptr<IndexedDBConnection> connection, | |
32 const IndexedDBDatabaseMetadata& metadata) { | |
33 connection_ = std::move(connection); | |
34 } | |
35 | |
36 } // namespace content | |
OLD | NEW |