| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/test/test_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/frame_tree.h" | 7 #include "content/browser/frame_host/frame_tree.h" |
| 8 #include "content/common/frame_messages.h" | 8 #include "content/common/frame_messages.h" |
| 9 #include "content/test/test_render_view_host.h" | 9 #include "content/test/test_render_view_host.h" |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 page_id, url, PAGE_TRANSITION_RELOAD, 500); | 49 page_id, url, PAGE_TRANSITION_RELOAD, 500); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode( | 52 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode( |
| 53 int page_id, | 53 int page_id, |
| 54 const GURL& url, PageTransition transition, | 54 const GURL& url, PageTransition transition, |
| 55 int response_code) { | 55 int response_code) { |
| 56 // DidStartProvisionalLoad may delete the pending entry that holds |url|, | 56 // DidStartProvisionalLoad may delete the pending entry that holds |url|, |
| 57 // so we keep a copy of it to use in SendNavigateWithParameters. | 57 // so we keep a copy of it to use in SendNavigateWithParameters. |
| 58 GURL url_copy(url); | 58 GURL url_copy(url); |
| 59 OnDidStartProvisionalLoadForFrame(-1, url_copy); | 59 OnDidStartProvisionalLoadForFrame(-1, url_copy, false); |
| 60 SendNavigateWithParameters(page_id, url_copy, transition, url_copy, | 60 SendNavigateWithParameters(page_id, url_copy, transition, url_copy, |
| 61 response_code, 0, std::vector<GURL>()); | 61 response_code, 0, std::vector<GURL>()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void TestRenderFrameHost::SendNavigateWithOriginalRequestURL( | 64 void TestRenderFrameHost::SendNavigateWithOriginalRequestURL( |
| 65 int page_id, | 65 int page_id, |
| 66 const GURL& url, | 66 const GURL& url, |
| 67 const GURL& original_request_url) { | 67 const GURL& original_request_url) { |
| 68 OnDidStartProvisionalLoadForFrame(-1, url); | 68 OnDidStartProvisionalLoadForFrame(-1, url, false); |
| 69 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, | 69 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, |
| 70 original_request_url, 200, 0, std::vector<GURL>()); | 70 original_request_url, 200, 0, std::vector<GURL>()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void TestRenderFrameHost::SendNavigateWithFile( | 73 void TestRenderFrameHost::SendNavigateWithFile( |
| 74 int page_id, | 74 int page_id, |
| 75 const GURL& url, | 75 const GURL& url, |
| 76 const base::FilePath& file_path) { | 76 const base::FilePath& file_path) { |
| 77 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, url, 200, | 77 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, url, 200, |
| 78 &file_path, std::vector<GURL>()); | 78 &file_path, std::vector<GURL>()); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 url, | 130 url, |
| 131 false, | 131 false, |
| 132 file_path_for_history_item ? "data" : NULL, | 132 file_path_for_history_item ? "data" : NULL, |
| 133 file_path_for_history_item); | 133 file_path_for_history_item); |
| 134 | 134 |
| 135 FrameHostMsg_DidCommitProvisionalLoad msg(1, params); | 135 FrameHostMsg_DidCommitProvisionalLoad msg(1, params); |
| 136 OnNavigate(msg); | 136 OnNavigate(msg); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace content | 139 } // namespace content |
| OLD | NEW |