| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 next_rfh->GetProcess()->GetID()); | 108 next_rfh->GetProcess()->GetID()); |
| 109 | 109 |
| 110 return next_rfh->render_view_host(); | 110 return next_rfh->render_view_host(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ResourceRequest CreateXHRRequest(const char* url) { | 113 ResourceRequest CreateXHRRequest(const char* url) { |
| 114 ResourceRequest request; | 114 ResourceRequest request; |
| 115 request.method = "GET"; | 115 request.method = "GET"; |
| 116 request.url = GURL(url); | 116 request.url = GURL(url); |
| 117 request.referrer_policy = blink::WebReferrerPolicyDefault; | 117 request.referrer_policy = blink::WebReferrerPolicyDefault; |
| 118 request.request_initiator = url::Origin(); |
| 118 request.load_flags = 0; | 119 request.load_flags = 0; |
| 119 request.origin_pid = 0; | 120 request.origin_pid = 0; |
| 120 request.resource_type = RESOURCE_TYPE_XHR; | 121 request.resource_type = RESOURCE_TYPE_XHR; |
| 121 request.request_context = 0; | 122 request.request_context = 0; |
| 122 request.appcache_host_id = kAppCacheNoHostId; | 123 request.appcache_host_id = kAppCacheNoHostId; |
| 123 request.download_to_file = false; | 124 request.download_to_file = false; |
| 124 request.should_reset_appcache = false; | 125 request.should_reset_appcache = false; |
| 125 request.is_main_frame = true; | 126 request.is_main_frame = true; |
| 126 request.parent_is_main_frame = false; | 127 request.parent_is_main_frame = false; |
| 127 request.parent_render_frame_id = -1; | 128 request.parent_render_frame_id = -1; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // separate task of the message loop, so ensure that the process is still | 552 // separate task of the message loop, so ensure that the process is still |
| 552 // considered alive. | 553 // considered alive. |
| 553 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); | 554 EXPECT_TRUE(root->current_frame_host()->GetProcess()->HasConnection()); |
| 554 | 555 |
| 555 exit_observer.Wait(); | 556 exit_observer.Wait(); |
| 556 EXPECT_FALSE(exit_observer.did_exit_normally()); | 557 EXPECT_FALSE(exit_observer.did_exit_normally()); |
| 557 ResourceDispatcherHost::Get()->SetDelegate(nullptr); | 558 ResourceDispatcherHost::Get()->SetDelegate(nullptr); |
| 558 } | 559 } |
| 559 | 560 |
| 560 } // namespace content | 561 } // namespace content |
| OLD | NEW |