| 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" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "ui/base/page_transition_types.h" | 13 #include "ui/base/page_transition_types.h" |
| 14 #include "ui/gfx/geometry/size.h" |
| 12 | 15 |
| 13 class GURL; | 16 class GURL; |
| 14 | 17 |
| 15 namespace content { | 18 namespace content { |
| 16 | 19 |
| 17 class BrowserContext; | 20 class BrowserContext; |
| 18 class NavigationData; | 21 class NavigationData; |
| 19 class NavigationHandle; | 22 class NavigationHandle; |
| 20 class RenderFrameHost; | 23 class RenderFrameHost; |
| 21 class WebContents; | 24 class WebContents; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ui::PageTransition transition) = 0; | 120 ui::PageTransition transition) = 0; |
| 118 | 121 |
| 119 // Sets NavgationData on |navigation_handle|. | 122 // Sets NavgationData on |navigation_handle|. |
| 120 virtual void SetNavigationData( | 123 virtual void SetNavigationData( |
| 121 NavigationHandle* navigation_handle, | 124 NavigationHandle* navigation_handle, |
| 122 std::unique_ptr<NavigationData> navigation_data) = 0; | 125 std::unique_ptr<NavigationData> navigation_data) = 0; |
| 123 | 126 |
| 124 // Returns headers that were passed in the previous SaveFrameWithHeaders(...) | 127 // Returns headers that were passed in the previous SaveFrameWithHeaders(...) |
| 125 // call. | 128 // call. |
| 126 virtual const std::string& GetSaveFrameHeaders() = 0; | 129 virtual const std::string& GetSaveFrameHeaders() = 0; |
| 130 |
| 131 // Simulates a request completion for DownloadImage(). Returns whether an |
| 132 // actual download associated to |id| was pending. |
| 133 virtual bool TestDidDownloadImage( |
| 134 int id, |
| 135 int http_status_code, |
| 136 const std::vector<SkBitmap>& bitmaps, |
| 137 const std::vector<gfx::Size>& original_bitmap_sizes) = 0; |
| 127 }; | 138 }; |
| 128 | 139 |
| 129 } // namespace content | 140 } // namespace content |
| 130 | 141 |
| 131 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ | 142 #endif // CONTENT_PUBLIC_TEST_WEB_CONTENTS_TESTER_H_ |
| OLD | NEW |