OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/browser_thread.h" | 7 #include "content/browser/browser_thread.h" |
8 #include "content/browser/renderer_host/global_request_id.h" | 8 #include "content/browser/renderer_host/global_request_id.h" |
9 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 9 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
10 #include "content/browser/renderer_host/resource_handler.h" | 10 #include "content/browser/renderer_host/resource_handler.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void OnRequestClosed() { | 68 virtual void OnRequestClosed() { |
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, ResourceType::MAIN_FRAME, 0, false, false, false, -1, -1); | 78 request_id, ResourceType::MAIN_FRAME, 0, false, false, false); |
79 } | 79 } |
80 | 80 |
81 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { | 81 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { |
82 ResourceQueue::DelegateSet delegate_set; | 82 ResourceQueue::DelegateSet delegate_set; |
83 delegate_set.insert(delegate); | 83 delegate_set.insert(delegate); |
84 queue->Initialize(delegate_set); | 84 queue->Initialize(delegate_set); |
85 } | 85 } |
86 | 86 |
87 void InitializeQueue(ResourceQueue* queue, | 87 void InitializeQueue(ResourceQueue* queue, |
88 ResourceQueueDelegate* delegate1, | 88 ResourceQueueDelegate* delegate1, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 MessageLoop::current()->RunAllPending(); | 280 MessageLoop::current()->RunAllPending(); |
281 EXPECT_EQ(0, response_started_count_); | 281 EXPECT_EQ(0, response_started_count_); |
282 | 282 |
283 queue.Shutdown(); | 283 queue.Shutdown(); |
284 | 284 |
285 MessageLoop::current()->RunAllPending(); | 285 MessageLoop::current()->RunAllPending(); |
286 EXPECT_EQ(0, response_started_count_); | 286 EXPECT_EQ(0, response_started_count_); |
287 } | 287 } |
288 | 288 |
289 } // namespace | 289 } // namespace |
OLD | NEW |