OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ |
6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ | 6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ |
7 | 7 |
| 8 #include "base/time.h" |
8 #include "content/public/browser/download_id.h" | 9 #include "content/public/browser/download_id.h" |
9 #include "content/public/browser/download_interrupt_reasons.h" | 10 #include "content/public/browser/download_interrupt_reasons.h" |
10 #include "content/public/browser/download_item.h" | 11 #include "content/public/browser/download_item.h" |
11 #include "content/public/browser/download_persistent_store_info.h" | 12 #include "googleurl/src/gurl.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class MockDownloadItem : public DownloadItem { | 18 class MockDownloadItem : public DownloadItem { |
18 public: | 19 public: |
19 MockDownloadItem(); | 20 MockDownloadItem(); |
20 virtual ~MockDownloadItem(); | 21 virtual ~MockDownloadItem(); |
21 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); | 22 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 MOCK_CONST_METHOD0(HasUserGesture, bool()); | 83 MOCK_CONST_METHOD0(HasUserGesture, bool()); |
83 MOCK_CONST_METHOD0(GetTransitionType, PageTransition()); | 84 MOCK_CONST_METHOD0(GetTransitionType, PageTransition()); |
84 MOCK_CONST_METHOD0(IsOtr, bool()); | 85 MOCK_CONST_METHOD0(IsOtr, bool()); |
85 MOCK_CONST_METHOD0(IsTemporary, bool()); | 86 MOCK_CONST_METHOD0(IsTemporary, bool()); |
86 MOCK_METHOD1(SetIsTemporary, void(bool)); | 87 MOCK_METHOD1(SetIsTemporary, void(bool)); |
87 MOCK_METHOD1(SetOpened, void(bool)); | 88 MOCK_METHOD1(SetOpened, void(bool)); |
88 MOCK_CONST_METHOD0(GetOpened, bool()); | 89 MOCK_CONST_METHOD0(GetOpened, bool()); |
89 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); | 90 MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&()); |
90 MOCK_CONST_METHOD0(GetETag, const std::string&()); | 91 MOCK_CONST_METHOD0(GetETag, const std::string&()); |
91 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); | 92 MOCK_CONST_METHOD0(GetLastReason, DownloadInterruptReason()); |
92 MOCK_CONST_METHOD0(GetPersistentStoreInfo, DownloadPersistentStoreInfo()); | |
93 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); | 93 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); |
94 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); | 94 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); |
95 MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath()); | 95 MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath()); |
96 MOCK_METHOD1(SetDisplayName, void(const FilePath&)); | 96 MOCK_METHOD1(SetDisplayName, void(const FilePath&)); |
97 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, FilePath()); | 97 MOCK_CONST_METHOD0(GetUserVerifiedFilePath, FilePath()); |
98 MOCK_CONST_METHOD1(DebugString, std::string(bool)); | 98 MOCK_CONST_METHOD1(DebugString, std::string(bool)); |
99 MOCK_METHOD0(MockDownloadOpenForTesting, void()); | 99 MOCK_METHOD0(MockDownloadOpenForTesting, void()); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace content | 102 } // namespace content |
103 | 103 |
104 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ | 104 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ |
OLD | NEW |