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.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 Loading... |
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 Loading... |
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 |
OLD | NEW |