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

Unified Diff: chrome/browser/bitmap_fetcher_browsertest.cc

Issue 263563003: Add referrer & load flag support to BitmapFetcher class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include another missing header Created 6 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
« no previous file with comments | « chrome/browser/bitmap_fetcher.cc ('k') | chrome/browser/image_holder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bitmap_fetcher_browsertest.cc
diff --git a/chrome/browser/bitmap_fetcher_browsertest.cc b/chrome/browser/bitmap_fetcher_browsertest.cc
index 534fa6ef6ad1656d5337601588129cba2ca74e2c..3706d117a744263736d9e433e334765b0e3135a2 100644
--- a/chrome/browser/bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/bitmap_fetcher_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/test/test_utils.h"
+#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher.h"
@@ -113,7 +114,11 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, MAYBE_StartTest) {
// We expect that the image decoder will get called and return
// an image in a callback to OnImageDecoded().
- fetcher.Start(browser()->profile()->GetRequestContext());
+ fetcher.Start(
+ browser()->profile()->GetRequestContext(),
+ std::string(),
+ net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
+ net::LOAD_NORMAL);
// Blocks until test delegate is notified via a callback.
content::RunMessageLoop();
@@ -162,7 +167,11 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, OnURLFetchFailureTest) {
net::HTTP_INTERNAL_SERVER_ERROR,
net::URLRequestStatus::FAILED);
- fetcher.Start(browser()->profile()->GetRequestContext());
+ fetcher.Start(
+ browser()->profile()->GetRequestContext(),
+ std::string(),
+ net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
+ net::LOAD_NORMAL);
// Blocks until test delegate is notified via a callback.
content::RunMessageLoop();
@@ -186,7 +195,11 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, MAYBE_HandleImageFailedTest) {
net::HTTP_OK,
net::URLRequestStatus::SUCCESS);
- fetcher.Start(browser()->profile()->GetRequestContext());
+ fetcher.Start(
+ browser()->profile()->GetRequestContext(),
+ std::string(),
+ net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
+ net::LOAD_NORMAL);
// Blocks until test delegate is notified via a callback.
content::RunMessageLoop();
« no previous file with comments | « chrome/browser/bitmap_fetcher.cc ('k') | chrome/browser/image_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698