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

Side by Side Diff: content/child/url_response_body_consumer_unittest.cc

Issue 2315443003: Stop sending serialized SSLStatus to the renderer. (Closed)
Patch Set: self review fix and merge fix Created 4 years, 3 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
« no previous file with comments | « content/child/resource_dispatcher_unittest.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/child/url_response_body_consumer.h" 5 #include "content/child/url_response_body_consumer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 void OnReceivedData(std::unique_ptr<ReceivedData> data) override { 46 void OnReceivedData(std::unique_ptr<ReceivedData> data) override {
47 EXPECT_FALSE(context_->complete); 47 EXPECT_FALSE(context_->complete);
48 context_->data.append(data->payload(), data->length()); 48 context_->data.append(data->payload(), data->length());
49 context_->run_loop_quit_closure.Run(); 49 context_->run_loop_quit_closure.Run();
50 } 50 }
51 51
52 void OnCompletedRequest(int error_code, 52 void OnCompletedRequest(int error_code,
53 bool was_ignored_by_handler, 53 bool was_ignored_by_handler,
54 bool stale_copy_in_cache, 54 bool stale_copy_in_cache,
55 const std::string& security_info,
56 const base::TimeTicks& completion_time, 55 const base::TimeTicks& completion_time,
57 int64_t total_transfer_size) override { 56 int64_t total_transfer_size) override {
58 EXPECT_FALSE(context_->complete); 57 EXPECT_FALSE(context_->complete);
59 context_->complete = true; 58 context_->complete = true;
60 context_->error_code = error_code; 59 context_->error_code = error_code;
61 context_->run_loop_quit_closure.Run(); 60 context_->run_loop_quit_closure.Run();
62 } 61 }
63 62
64 struct Context { 63 struct Context {
65 // Data received. If downloading to file, remains empty. 64 // Data received. If downloading to file, remains empty.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Run(&context); 201 Run(&context);
203 202
204 EXPECT_TRUE(context.complete); 203 EXPECT_TRUE(context.complete);
205 EXPECT_EQ(net::ERR_FAILED, context.error_code); 204 EXPECT_EQ(net::ERR_FAILED, context.error_code);
206 EXPECT_EQ("", context.data); 205 EXPECT_EQ("", context.data);
207 } 206 }
208 207
209 } // namespace 208 } // namespace
210 209
211 } // namespace content 210 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher_unittest.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698