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

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

Issue 14335017: content: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/webmessageportchannel_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 (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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 bool defer_loading() const { 323 bool defer_loading() const {
324 return defer_loading_; 324 return defer_loading_;
325 } 325 }
326 326
327 bool defer_loading_; 327 bool defer_loading_;
328 base::SharedMemory shared_handle_; 328 base::SharedMemory shared_handle_;
329 }; 329 };
330 330
331 TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) { 331 TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) {
332 MessageLoop message_loop(MessageLoop::TYPE_IO); 332 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO);
333 333
334 ResourceLoaderBridge* bridge = CreateBridge(); 334 ResourceLoaderBridge* bridge = CreateBridge();
335 335
336 bridge->Start(this); 336 bridge->Start(this);
337 InitMessages(); 337 InitMessages();
338 338
339 // Dispatch deferred messages. 339 // Dispatch deferred messages.
340 message_loop.RunUntilIdle(); 340 message_loop.RunUntilIdle();
341 delete bridge; 341 delete bridge;
342 } 342 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 response_head.error_code = net::OK; 433 response_head.error_code = net::OK;
434 434
435 PerformTest(response_head); 435 PerformTest(response_head);
436 436
437 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); 437 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start);
438 EXPECT_EQ(base::TimeTicks(), 438 EXPECT_EQ(base::TimeTicks(),
439 response_info().load_timing.connect_timing.dns_start); 439 response_info().load_timing.connect_timing.dns_start);
440 } 440 }
441 441
442 } // namespace content 442 } // namespace content
OLDNEW
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/common/webmessageportchannel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698