Home | History | Annotate | Download | only in download
      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 
      8 using ::testing::_;
      9 using ::testing::Return;
     10 
     11 namespace content {
     12 namespace {
     13 
     14 void SuccessRun(const DownloadFile::InitializeCallback& callback) {
     15   callback.Run(DOWNLOAD_INTERRUPT_REASON_NONE);
     16 }
     17 
     18 }  // namespace
     19 
     20 MockDownloadFile::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 
     27 MockDownloadFile::~MockDownloadFile() {
     28 }
     29 
     30 }  // namespace content
     31