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

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: Fix non-English detection Created 5 years 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
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 205ce219323b8d8da0d226b2b424f9f8007f19b0..ccb134f16b00ad311a2cb89e6754720ab5458fda 100644
--- a/content/public/test/render_view_test.h
+++ b/content/public/test/render_view_test.h
@@ -43,23 +43,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();
@@ -83,10 +83,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_override);
+
// Returns the current PageState.
// In OOPIF enabled modes, this returns a PageState object for the main frame.
PageState GetCurrentPageState();
@@ -183,7 +189,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_;

Powered by Google App Engine
This is Rietveld 408576698