Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1780)

Unified Diff: content/public/test/render_view_test.h

Issue 1508293006: Check url path as well as document title to detect formless autofill page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: – Rebaseline heuristic test output Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/content/renderer/form_autofill_util.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/render_view_test.h
diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h
index 27cea17e7b33dee013de0c7fe5db01754d7283cd..6e351de7ebd0a0cda3659b224504ecd4af965847 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_;
« no previous file with comments | « components/autofill/content/renderer/form_autofill_util.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698