Chromium Code Reviews| Index: content/test/layouttest_support.cc |
| diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc |
| index d582632d3cac0a1af625c23d7c76c07e2f3e2bfc..eebdbb259dba1530acd49493bd9778e3f19b6877 100644 |
| --- a/content/test/layouttest_support.cc |
| +++ b/content/test/layouttest_support.cc |
| @@ -11,6 +11,7 @@ |
| #include "content/common/gpu/image_transport_surface.h" |
| #include "content/public/common/page_state.h" |
| #include "content/public/renderer/renderer_gamepad_provider.h" |
| +#include "content/renderer/fetchers/manifest_fetcher.h" |
| #include "content/renderer/history_entry.h" |
| #include "content/renderer/history_serialization.h" |
| #include "content/renderer/render_frame_impl.h" |
| @@ -25,6 +26,7 @@ |
| #include "third_party/WebKit/public/platform/WebDeviceOrientationData.h" |
| #include "third_party/WebKit/public/platform/WebGamepads.h" |
| #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| +#include "third_party/WebKit/public/web/WebView.h" |
| #if defined(OS_MACOSX) |
| #include "content/browser/frame_host/popup_menu_helper_mac.h" |
| @@ -82,6 +84,24 @@ void EnableWebTestProxyCreation( |
| RenderFrameImpl::InstallCreateHook(CreateWebFrameTestProxy); |
| } |
| +void FetchManifestDoneCallback( |
| + scoped_ptr<ManifestFetcher> fetcher, |
| + const FetchManifestCallback& callback, |
| + const blink::WebURLResponse& response, |
| + const std::string& data) { |
| + callback.Run(response, data); |
|
mlamouri (slow - plz ping)
2014/09/24 15:52:10
nit: add a comment saying that |fetcher| will be d
|
| +} |
| + |
| +void FetchManifest(blink::WebView* view, GURL url, |
|
Mike West
2014/09/24 15:15:47
Nit: Can this be `const GURL&`? It looks like that
|
| + const FetchManifestCallback& callback) { |
| + scoped_ptr<ManifestFetcher> fetcher(new ManifestFetcher(url)); |
| + |
| + fetcher->Start(view->mainFrame(), |
| + base::Bind(&FetchManifestDoneCallback, |
| + base::Passed(&fetcher), |
| + callback)); |
| +} |
| + |
| void SetMockGamepadProvider(scoped_ptr<RendererGamepadProvider> provider) { |
| RenderThreadImpl::current()->webkit_platform_support()-> |
| SetPlatformEventObserverForTesting( |