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

Unified Diff: content/browser/loader/navigation_url_loader_unittest.cc

Issue 1416953007: Add a function to add extra headers from NavigationThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data-reduction-proxy-resource-throttle
Patch Set: Rebase 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/browser/loader/navigation_url_loader_unittest.cc
diff --git a/content/browser/loader/navigation_url_loader_unittest.cc b/content/browser/loader/navigation_url_loader_unittest.cc
index 418046ef46002ccd4b430d474166a9f84563cf3a..bbfdf131fc45af03aeb3a5d79286390508f01b42 100644
--- a/content/browser/loader/navigation_url_loader_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_unittest.cc
@@ -37,6 +37,8 @@
namespace content {
+using ExtraHeadersList = std::vector<std::pair<std::string, std::string> >;
+
namespace {
class StreamProtocolHandler
@@ -265,7 +267,7 @@ TEST_F(NavigationURLLoaderTest, RequestRedirected) {
EXPECT_EQ(1, delegate.on_request_handled_counter());
// Wait for the response to complete.
- loader->FollowRedirect();
+ loader->FollowRedirect(ExtraHeadersList());
delegate.WaitForResponseStarted();
// Check the response is correct.
@@ -312,7 +314,7 @@ TEST_F(NavigationURLLoaderTest, CancelResponseRace) {
// In the same event loop iteration, follow the redirect (allowing the
// response to go through) and destroy the loader.
- loader->FollowRedirect();
+ loader->FollowRedirect(ExtraHeadersList());
loader.reset();
// Verify the URLRequestTestJob no longer has anything paused and that no

Powered by Google App Engine
This is Rietveld 408576698