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_WEB_CONTENTS_TESTER_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 6 #define CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
9 | 10 |
10 #include "content/public/browser/site_instance.h" | 11 #include "content/public/browser/site_instance.h" |
11 #include "ui/base/page_transition_types.h" | 12 #include "ui/base/page_transition_types.h" |
12 | 13 |
13 class GURL; | 14 class GURL; |
| 15 class SkBitmap; |
| 16 |
| 17 namespace gfx { |
| 18 class Size; |
| 19 } |
14 | 20 |
15 namespace content { | 21 namespace content { |
16 | 22 |
17 class BrowserContext; | 23 class BrowserContext; |
18 class NavigationData; | 24 class NavigationData; |
19 class NavigationHandle; | 25 class NavigationHandle; |
20 class RenderFrameHost; | 26 class RenderFrameHost; |
21 class WebContents; | 27 class WebContents; |
22 struct Referrer; | 28 struct Referrer; |
23 | 29 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ui::PageTransition transition) = 0; | 123 ui::PageTransition transition) = 0; |
118 | 124 |
119 // Sets NavgationData on |navigation_handle|. | 125 // Sets NavgationData on |navigation_handle|. |
120 virtual void SetNavigationData( | 126 virtual void SetNavigationData( |
121 NavigationHandle* navigation_handle, | 127 NavigationHandle* navigation_handle, |
122 std::unique_ptr<NavigationData> navigation_data) = 0; | 128 std::unique_ptr<NavigationData> navigation_data) = 0; |
123 | 129 |
124 // Returns headers that were passed in the previous SaveFrameWithHeaders(...) | 130 // Returns headers that were passed in the previous SaveFrameWithHeaders(...) |
125 // call. | 131 // call. |
126 virtual const std::string& GetSaveFrameHeaders() = 0; | 132 virtual const std::string& GetSaveFrameHeaders() = 0; |
| 133 |
| 134 // Returns whether a download request triggered via DownloadImage() is in |
| 135 // progress for |url|. |
| 136 virtual bool HasPendingDownloadImage(const GURL& url) = 0; |
| 137 |
| 138 // Simulates a request completion for DownloadImage(). For convenience, it |
| 139 // returns whether an actual download associated to |url| was pending. |
| 140 virtual bool TestDidDownloadImage( |
| 141 const GURL& url, |
| 142 int http_status_code, |
| 143 const std::vector<SkBitmap>& bitmaps, |
| 144 const std::vector<gfx::Size>& original_bitmap_sizes) = 0; |
127 }; | 145 }; |
128 | 146 |
129 } // namespace content | 147 } // namespace content |
130 | 148 |
131 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 149 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
OLD | NEW |