| OLD | NEW |
| 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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 bool defer_loading() const { | 322 bool defer_loading() const { |
| 323 return defer_loading_; | 323 return defer_loading_; |
| 324 } | 324 } |
| 325 | 325 |
| 326 bool defer_loading_; | 326 bool defer_loading_; |
| 327 base::SharedMemory shared_handle_; | 327 base::SharedMemory shared_handle_; |
| 328 }; | 328 }; |
| 329 | 329 |
| 330 TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) { | 330 TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) { |
| 331 base::MessageLoop message_loop(base::MessageLoop::TYPE_IO); | 331 base::MessageLoopForIO message_loop; |
| 332 | 332 |
| 333 ResourceLoaderBridge* bridge = CreateBridge(); | 333 ResourceLoaderBridge* bridge = CreateBridge(); |
| 334 | 334 |
| 335 bridge->Start(this); | 335 bridge->Start(this); |
| 336 InitMessages(); | 336 InitMessages(); |
| 337 | 337 |
| 338 // Dispatch deferred messages. | 338 // Dispatch deferred messages. |
| 339 message_loop.RunUntilIdle(); | 339 message_loop.RunUntilIdle(); |
| 340 delete bridge; | 340 delete bridge; |
| 341 } | 341 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 response_head.error_code = net::OK; | 432 response_head.error_code = net::OK; |
| 433 | 433 |
| 434 PerformTest(response_head); | 434 PerformTest(response_head); |
| 435 | 435 |
| 436 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); | 436 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); |
| 437 EXPECT_EQ(base::TimeTicks(), | 437 EXPECT_EQ(base::TimeTicks(), |
| 438 response_info().load_timing.connect_timing.dns_start); | 438 response_info().load_timing.connect_timing.dns_start); |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace content | 441 } // namespace content |
| OLD | NEW |