diff options
author | kundaji <kundaji@chromium.org> | 2015-05-14 12:40:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-14 19:40:19 +0000 |
commit | 6db683ca806cdf9b78deea233d6b45794fc655c1 (patch) | |
tree | ecab581ee59111af3353fe6ae315f58797d70b91 /content/test/test_web_contents.h | |
parent | 5691d78e3d49a17b71e11f3da781f4459d17b1c6 (diff) | |
download | chromium_src-6db683ca806cdf9b78deea233d6b45794fc655c1.zip chromium_src-6db683ca806cdf9b78deea233d6b45794fc655c1.tar.gz chromium_src-6db683ca806cdf9b78deea233d6b45794fc655c1.tar.bz2 |
Tests for "Save Image As..." when Data Saver is enabled.
Verify that request headers specify a passthrough when "Save Image As..."
feature is used with Data Saver enabled, and this header is not specified
with Data Saver disabled.
Override SaveFrameWithHeaders in TestWebContents to keep track of
the headers.
BUG=467163
Review URL: https://codereview.chromium.org/1137563002
Cr-Commit-Position: refs/heads/master@{#329900}
Diffstat (limited to 'content/test/test_web_contents.h')
-rw-r--r-- | content/test/test_web_contents.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h index 632d57f..53bc82a 100644 --- a/content/test/test_web_contents.h +++ b/content/test/test_web_contents.h @@ -5,12 +5,16 @@ #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_H_ #define CONTENT_TEST_TEST_WEB_CONTENTS_H_ +#include <string> + #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/test/web_contents_tester.h" #include "content/test/test_render_frame_host.h" #include "content/test/test_render_view_host.h" #include "ui/base/page_transition_types.h" +class GURL; +class Referrer; class SiteInstanceImpl; namespace content { @@ -51,6 +55,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester { const GURL& url, const Referrer& referrer, ui::PageTransition transition) override; + const std::string& GetSaveFrameHeaders() override; // True if a cross-site navigation is pending. bool CrossProcessNavigationPending(); @@ -116,6 +121,9 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester { bool user_gesture) override; void ShowCreatedWidget(int route_id, const gfx::Rect& initial_rect) override; void ShowCreatedFullscreenWidget(int route_id) override; + void SaveFrameWithHeaders(const GURL& url, + const Referrer& referrer, + const std::string& headers) override; RenderViewHostDelegateView* delegate_view_override_; @@ -123,6 +131,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester { bool expect_set_history_offset_and_length_; int expect_set_history_offset_and_length_history_offset_; int expect_set_history_offset_and_length_history_length_; + std::string save_frame_headers_; }; } // namespace content |