| 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 "content/browser/renderer_host/resource_dispatcher_host_impl.h" | 5 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 request.origin_pid = 0; | 83 request.origin_pid = 0; |
| 84 request.resource_type = type; | 84 request.resource_type = type; |
| 85 request.request_context = 0; | 85 request.request_context = 0; |
| 86 request.appcache_host_id = appcache::kNoHostId; | 86 request.appcache_host_id = appcache::kNoHostId; |
| 87 request.download_to_file = false; | 87 request.download_to_file = false; |
| 88 request.is_main_frame = true; | 88 request.is_main_frame = true; |
| 89 request.frame_id = 0; | 89 request.frame_id = 0; |
| 90 request.parent_is_main_frame = false; | 90 request.parent_is_main_frame = false; |
| 91 request.parent_frame_id = -1; | 91 request.parent_frame_id = -1; |
| 92 request.transition_type = content::PAGE_TRANSITION_LINK; | 92 request.transition_type = content::PAGE_TRANSITION_LINK; |
| 93 request.allow_download = true; |
| 93 return request; | 94 return request; |
| 94 } | 95 } |
| 95 | 96 |
| 96 // Spin up the message loop to kick off the request. | 97 // Spin up the message loop to kick off the request. |
| 97 static void KickOffRequest() { | 98 static void KickOffRequest() { |
| 98 MessageLoop::current()->RunAllPending(); | 99 MessageLoop::current()->RunAllPending(); |
| 99 } | 100 } |
| 100 | 101 |
| 101 // We may want to move this to a shared space if it is useful for something else | 102 // We may want to move this to a shared space if it is useful for something else |
| 102 class ResourceIPCAccumulator { | 103 class ResourceIPCAccumulator { |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 PickleIterator iter(msgs[0][0]); | 1396 PickleIterator iter(msgs[0][0]); |
| 1396 EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &request_id)); | 1397 EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &request_id)); |
| 1397 EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &status)); | 1398 EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &status)); |
| 1398 | 1399 |
| 1399 EXPECT_EQ(1, request_id); | 1400 EXPECT_EQ(1, request_id); |
| 1400 EXPECT_EQ(net::URLRequestStatus::FAILED, status.status()); | 1401 EXPECT_EQ(net::URLRequestStatus::FAILED, status.status()); |
| 1401 EXPECT_EQ(net::ERR_UNKNOWN_URL_SCHEME, status.error()); | 1402 EXPECT_EQ(net::ERR_UNKNOWN_URL_SCHEME, status.error()); |
| 1402 } | 1403 } |
| 1403 | 1404 |
| 1404 } // namespace content | 1405 } // namespace content |
| OLD | NEW |