diff options
Diffstat (limited to 'content/public/test/render_view_test.h')
-rw-r--r-- | content/public/test/render_view_test.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h index 27cea17..6e351de 100644 --- a/content/public/test/render_view_test.h +++ b/content/public/test/render_view_test.h @@ -48,23 +48,23 @@ class FakeCompositorDependencies; class MockRenderProcess; class PageState; class RendererMainPlatformDelegate; -class RendererBlinkPlatformImplNoSandboxImpl; +class RendererBlinkPlatformImplTestOverrideImpl; class RenderView; class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient { public: - // A special BlinkPlatformImpl class for getting rid off the dependency to the - // sandbox, which is not available in RenderViewTest. - class RendererBlinkPlatformImplNoSandbox { + // A special BlinkPlatformImpl class with overrides that are useful for + // RenderViewTest. + class RendererBlinkPlatformImplTestOverride { public: - RendererBlinkPlatformImplNoSandbox(); - ~RendererBlinkPlatformImplNoSandbox(); + RendererBlinkPlatformImplTestOverride(); + ~RendererBlinkPlatformImplTestOverride(); blink::Platform* Get() const; void Shutdown(); private: scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; - scoped_ptr<RendererBlinkPlatformImplNoSandboxImpl> blink_platform_impl_; + scoped_ptr<RendererBlinkPlatformImplTestOverrideImpl> blink_platform_impl_; }; RenderViewTest(); @@ -88,10 +88,16 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient { bool ExecuteJavaScriptAndReturnIntValue(const base::string16& script, int* result); - // Loads the given HTML into the main frame as a data: URL and blocks until - // the navigation is committed. + // Loads |html| into the main frame as a data: URL and blocks until the + // navigation is committed. void LoadHTML(const char* html); + // Pretends to load |url| into the main frame, but substitutes |html| for the + // response body (and does not include any response headers). This can be used + // instead of LoadHTML for tests that cannot use a data: url (for example if + // document.location needs to be set to something specific.) + void LoadHTMLWithUrlOverride(const char* html, const char* url); + // Returns the current PageState. // In OOPIF enabled modes, this returns a PageState object for the main frame. PageState GetCurrentPageState(); @@ -188,7 +194,7 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient { // We use a naked pointer because we don't want to expose RenderViewImpl in // the embedder's namespace. RenderView* view_; - RendererBlinkPlatformImplNoSandbox blink_platform_impl_; + RendererBlinkPlatformImplTestOverride blink_platform_impl_; scoped_ptr<ContentClient> content_client_; scoped_ptr<ContentBrowserClient> content_browser_client_; scoped_ptr<ContentRendererClient> content_renderer_client_; |