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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "content/browser/browser_thread.h" | 7 #include "content/browser/browser_thread.h" |
8 #include "content/browser/mock_resource_context.h" | 8 #include "content/browser/mock_resource_context.h" |
9 #include "content/browser/renderer_host/global_request_id.h" | 9 #include "content/browser/renderer_host/global_request_id.h" |
10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void OnRequestClosed() { | 69 virtual void OnRequestClosed() { |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); | 73 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); |
74 }; | 74 }; |
75 | 75 |
76 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { | 76 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { |
77 return new ResourceDispatcherHostRequestInfo( | 77 return new ResourceDispatcherHostRequestInfo( |
78 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, 0, | 78 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, 0, |
79 request_id, false, -1, ResourceType::MAIN_FRAME, 0, false, false, false, | 79 request_id, false, -1, ResourceType::MAIN_FRAME, PageTransition::LINK, 0, |
80 content::MockResourceContext::GetInstance()); | 80 false, false, false, content::MockResourceContext::GetInstance()); |
81 } | 81 } |
82 | 82 |
83 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { | 83 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { |
84 ResourceQueue::DelegateSet delegate_set; | 84 ResourceQueue::DelegateSet delegate_set; |
85 delegate_set.insert(delegate); | 85 delegate_set.insert(delegate); |
86 queue->Initialize(delegate_set); | 86 queue->Initialize(delegate_set); |
87 } | 87 } |
88 | 88 |
89 void InitializeQueue(ResourceQueue* queue, | 89 void InitializeQueue(ResourceQueue* queue, |
90 ResourceQueueDelegate* delegate1, | 90 ResourceQueueDelegate* delegate1, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 MessageLoop::current()->RunAllPending(); | 288 MessageLoop::current()->RunAllPending(); |
289 EXPECT_EQ(0, response_started_count_); | 289 EXPECT_EQ(0, response_started_count_); |
290 | 290 |
291 queue.Shutdown(); | 291 queue.Shutdown(); |
292 | 292 |
293 MessageLoop::current()->RunAllPending(); | 293 MessageLoop::current()->RunAllPending(); |
294 EXPECT_EQ(0, response_started_count_); | 294 EXPECT_EQ(0, response_started_count_); |
295 } | 295 } |
296 | 296 |
297 } // namespace | 297 } // namespace |
OLD | NEW |