OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
7 #include "chrome/browser/browser_thread.h" | 7 #include "chrome/browser/browser_thread.h" |
8 #include "chrome/browser/renderer_host/global_request_id.h" | 8 #include "chrome/browser/renderer_host/global_request_id.h" |
9 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 9 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
10 #include "chrome/browser/renderer_host/resource_handler.h" | 10 #include "chrome/browser/renderer_host/resource_handler.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); | 72 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); |
73 }; | 73 }; |
74 | 74 |
75 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { | 75 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { |
76 return new ResourceDispatcherHostRequestInfo( | 76 return new ResourceDispatcherHostRequestInfo( |
77 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, | 77 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, |
78 request_id, "null", "null", ResourceType::MAIN_FRAME, | 78 request_id, "null", "null", ResourceType::MAIN_FRAME, |
79 0, false, false, -1, -1); | 79 0, false, false, false, -1, -1); |
80 } | 80 } |
81 | 81 |
82 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { | 82 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { |
83 ResourceQueue::DelegateSet delegate_set; | 83 ResourceQueue::DelegateSet delegate_set; |
84 delegate_set.insert(delegate); | 84 delegate_set.insert(delegate); |
85 queue->Initialize(delegate_set); | 85 queue->Initialize(delegate_set); |
86 } | 86 } |
87 | 87 |
88 void InitializeQueue(ResourceQueue* queue, | 88 void InitializeQueue(ResourceQueue* queue, |
89 ResourceQueueDelegate* delegate1, | 89 ResourceQueueDelegate* delegate1, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 MessageLoop::current()->RunAllPending(); | 281 MessageLoop::current()->RunAllPending(); |
282 EXPECT_EQ(0, response_started_count_); | 282 EXPECT_EQ(0, response_started_count_); |
283 | 283 |
284 queue.Shutdown(); | 284 queue.Shutdown(); |
285 | 285 |
286 MessageLoop::current()->RunAllPending(); | 286 MessageLoop::current()->RunAllPending(); |
287 EXPECT_EQ(0, response_started_count_); | 287 EXPECT_EQ(0, response_started_count_); |
288 } | 288 } |
289 | 289 |
290 } // namespace | 290 } // namespace |
OLD | NEW |