1// Copyright (c) 2012 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/download/mock_download_file.h" 6#include "testing/gmock/include/gmock/gmock.h" 7 8using ::testing::_; 9using ::testing::Return; 10 11namespace content { 12namespace { 13 14void SuccessRun(const DownloadFile::InitializeCallback& callback) { 15 callback.Run(DOWNLOAD_INTERRUPT_REASON_NONE); 16} 17 18} // namespace 19 20MockDownloadFile::MockDownloadFile() { 21 // This is here because |Initialize()| is normally called right after 22 // construction. 23 ON_CALL(*this, Initialize(_)) 24 .WillByDefault(::testing::Invoke(SuccessRun)); 25} 26 27MockDownloadFile::~MockDownloadFile() { 28} 29 30} // namespace content 31