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

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

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/resource_dispatcher.h" 5 #include "content/child/resource_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 }; 140 };
141 141
142 // Sets up the message sender override for the unit test. 142 // Sets up the message sender override for the unit test.
143 class ResourceDispatcherTest : public testing::Test, public IPC::Sender { 143 class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
144 public: 144 public:
145 ResourceDispatcherTest() 145 ResourceDispatcherTest()
146 : dispatcher_(new ResourceDispatcher(this, message_loop_.task_runner())) { 146 : dispatcher_(new ResourceDispatcher(this, message_loop_.task_runner())) {
147 } 147 }
148 148
149 ~ResourceDispatcherTest() override { 149 ~ResourceDispatcherTest() override {
150 STLDeleteContainerPairSecondPointers(shared_memory_map_.begin(), 150 base::STLDeleteContainerPairSecondPointers(shared_memory_map_.begin(),
151 shared_memory_map_.end()); 151 shared_memory_map_.end());
152 dispatcher_.reset(); 152 dispatcher_.reset();
153 base::RunLoop().RunUntilIdle(); 153 base::RunLoop().RunUntilIdle();
154 } 154 }
155 155
156 // Emulates IPC send operations (IPC::Sender) by adding 156 // Emulates IPC send operations (IPC::Sender) by adding
157 // pending messages to the queue. 157 // pending messages to the queue.
158 bool Send(IPC::Message* msg) override { 158 bool Send(IPC::Message* msg) override {
159 message_queue_.push_back(IPC::Message(*msg)); 159 message_queue_.push_back(IPC::Message(*msg));
160 delete msg; 160 delete msg;
161 return true; 161 return true;
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 ResourceResponseHead response_head; 935 ResourceResponseHead response_head;
936 936
937 PerformTest(response_head); 937 PerformTest(response_head);
938 938
939 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); 939 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start);
940 EXPECT_EQ(base::TimeTicks(), 940 EXPECT_EQ(base::TimeTicks(),
941 response_info().load_timing.connect_timing.dns_start); 941 response_info().load_timing.connect_timing.dns_start);
942 } 942 }
943 943
944 } // namespace content 944 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/service_worker/service_worker_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698