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

Unified Diff: content/test/test_web_contents.cc

Issue 1137563002: Tests for "Save Image As..." when Data Saver is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace Created 5 years, 7 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
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 28c39801e8b8156197ccb2e036b1ee0a4bdf8aa9..7bc62e22a4f1cae0cf789bee34fcaf3eb8861233 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -31,7 +31,8 @@ TestWebContents::TestWebContents(BrowserContext* browser_context)
: WebContentsImpl(browser_context, NULL),
delegate_view_override_(NULL),
expect_set_history_offset_and_length_(false),
- expect_set_history_offset_and_length_history_length_(0) {
+ expect_set_history_offset_and_length_history_length_(0),
+ save_frame_headers_(std::string()) {
Avi (use Gerrit) 2015/05/11 20:52:29 You don't need to initialize objects that initiali
Not at Google. Contact bengr 2015/05/11 22:43:14 Done.
}
TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
@@ -111,6 +112,10 @@ void TestWebContents::TestDidNavigateWithReferrer(
rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params);
}
+const std::string& TestWebContents::GetSaveFrameHeaders() {
+ return save_frame_headers_;
+}
+
bool TestWebContents::CrossProcessNavigationPending() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
@@ -285,4 +290,10 @@ void TestWebContents::ShowCreatedWidget(int route_id,
void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
}
+void TestWebContents::SaveFrameWithHeaders(const GURL& url,
+ const Referrer& referrer,
+ const std::string& headers) {
+ save_frame_headers_ = headers;
+}
+
} // namespace content
« content/public/test/web_contents_tester.h ('K') | « content/test/test_web_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698