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

Side by Side Diff: content/browser/loader/resource_loader_unittest.cc

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin comments Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void Resume() { 125 void Resume() {
126 controller()->Resume(); 126 controller()->Resume();
127 } 127 }
128 128
129 // ResourceHandler implementation: 129 // ResourceHandler implementation:
130 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE { 130 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE {
131 NOTREACHED(); 131 NOTREACHED();
132 return true; 132 return true;
133 } 133 }
134 134
135 virtual bool OnRequestRedirected(const GURL& url, 135 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
136 ResourceResponse* response, 136 ResourceResponse* response,
137 bool* defer) OVERRIDE { 137 bool* defer) OVERRIDE {
138 NOTREACHED(); 138 NOTREACHED();
139 return true; 139 return true;
140 } 140 }
141 141
142 virtual bool OnResponseStarted(ResourceResponse* response, 142 virtual bool OnResponseStarted(ResourceResponse* response,
143 bool* defer) OVERRIDE { 143 bool* defer) OVERRIDE {
144 EXPECT_FALSE(response_); 144 EXPECT_FALSE(response_);
145 response_ = response; 145 response_ = response;
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); 721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents));
722 EXPECT_EQ(test_data(), contents); 722 EXPECT_EQ(test_data(), contents);
723 723
724 // Release the loader. The file should be gone now. 724 // Release the loader. The file should be gone now.
725 ReleaseLoader(); 725 ReleaseLoader();
726 base::RunLoop().RunUntilIdle(); 726 base::RunLoop().RunUntilIdle();
727 EXPECT_FALSE(base::PathExists(temp_path())); 727 EXPECT_FALSE(base::PathExists(temp_path()));
728 } 728 }
729 729
730 } // namespace content 730 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/loader/stream_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698