| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 request_info.url = GURL(test_page_url); | 153 request_info.url = GURL(test_page_url); |
| 154 request_info.first_party_for_cookies = GURL(test_page_url); | 154 request_info.first_party_for_cookies = GURL(test_page_url); |
| 155 request_info.referrer = GURL(); | 155 request_info.referrer = GURL(); |
| 156 request_info.headers = std::string(); | 156 request_info.headers = std::string(); |
| 157 request_info.load_flags = 0; | 157 request_info.load_flags = 0; |
| 158 request_info.requestor_pid = 0; | 158 request_info.requestor_pid = 0; |
| 159 request_info.request_type = ResourceType::SUB_RESOURCE; | 159 request_info.request_type = ResourceType::SUB_RESOURCE; |
| 160 request_info.appcache_host_id = appcache::kNoHostId; | 160 request_info.appcache_host_id = appcache::kNoHostId; |
| 161 request_info.routing_id = 0; | 161 request_info.routing_id = 0; |
| 162 | 162 |
| 163 return dispatcher_->CreateBridge(request_info, -1, -1); | 163 return dispatcher_->CreateBridge(request_info); |
| 164 } | 164 } |
| 165 | 165 |
| 166 std::vector<IPC::Message> message_queue_; | 166 std::vector<IPC::Message> message_queue_; |
| 167 static scoped_ptr<ResourceDispatcher> dispatcher_; | 167 static scoped_ptr<ResourceDispatcher> dispatcher_; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 /*static*/ | 170 /*static*/ |
| 171 scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_; | 171 scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_; |
| 172 | 172 |
| 173 // Does a simple request and tests that the correct data is received. | 173 // Does a simple request and tests that the correct data is received. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 ResourceLoaderBridge* bridge = CreateBridge(); | 315 ResourceLoaderBridge* bridge = CreateBridge(); |
| 316 | 316 |
| 317 bridge->Start(this); | 317 bridge->Start(this); |
| 318 InitMessages(); | 318 InitMessages(); |
| 319 | 319 |
| 320 // Dispatch deferred messages. | 320 // Dispatch deferred messages. |
| 321 message_loop.RunAllPending(); | 321 message_loop.RunAllPending(); |
| 322 delete bridge; | 322 delete bridge; |
| 323 } | 323 } |
| OLD | NEW |