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.
5 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h"
7 #include "testing/gtest/include/gtest/gtest.h"
11 MockIndexedDBCallbacks::MockIndexedDBCallbacks()
12 : IndexedDBCallbacks(NULL
, 0, 0), expect_connection_(true) {}
13 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection
)
14 : IndexedDBCallbacks(NULL
, 0, 0), expect_connection_(expect_connection
) {}
16 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() {
17 EXPECT_EQ(expect_connection_
, !!connection_
);
20 void MockIndexedDBCallbacks::OnSuccess() {}
22 void MockIndexedDBCallbacks::OnSuccess(int64
) {}
24 void MockIndexedDBCallbacks::OnSuccess(const std::vector
<base::string16
>&) {}
26 void MockIndexedDBCallbacks::OnSuccess(
27 scoped_ptr
<IndexedDBConnection
> connection
,
28 const IndexedDBDatabaseMetadata
& metadata
) {
29 connection_
= connection
.Pass();
32 } // namespace content