| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   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( |   77   SendNavigateWithParameters( | 
|   78       page_id, url, PAGE_TRANSITION_LINK, url, 200, &file_path); |   78       page_id, url, PAGE_TRANSITION_LINK, url, 200, &file_path); | 
|   79 } |   79 } | 
|   80  |   80  | 
|   81 void TestRenderFrameHost::SendNavigateWithParams( |   81 void TestRenderFrameHost::SendNavigateWithParams( | 
|   82     FrameHostMsg_DidCommitProvisionalLoad_Params* params) { |   82     FrameHostMsg_DidCommitProvisionalLoad_Params* params) { | 
|   83   params->frame_id = GetRoutingID(); |  | 
|   84   FrameHostMsg_DidCommitProvisionalLoad msg(1, *params); |   83   FrameHostMsg_DidCommitProvisionalLoad msg(1, *params); | 
|   85   OnNavigate(msg); |   84   OnNavigate(msg); | 
|   86 } |   85 } | 
|   87  |   86  | 
|   88 void TestRenderFrameHost::SendNavigateWithParameters( |   87 void TestRenderFrameHost::SendNavigateWithParameters( | 
|   89     int page_id, |   88     int page_id, | 
|   90     const GURL& url, |   89     const GURL& url, | 
|   91     PageTransition transition, |   90     PageTransition transition, | 
|   92     const GURL& original_request_url, |   91     const GURL& original_request_url, | 
|   93     int response_code, |   92     int response_code, | 
|   94     const base::FilePath* file_path_for_history_item) { |   93     const base::FilePath* file_path_for_history_item) { | 
|   95   FrameHostMsg_DidCommitProvisionalLoad_Params params; |   94   FrameHostMsg_DidCommitProvisionalLoad_Params params; | 
|   96   params.page_id = page_id; |   95   params.page_id = page_id; | 
|   97   params.frame_id = GetRoutingID(); |  | 
|   98   params.url = url; |   96   params.url = url; | 
|   99   params.referrer = Referrer(); |   97   params.referrer = Referrer(); | 
|  100   params.transition = transition; |   98   params.transition = transition; | 
|  101   params.redirects = std::vector<GURL>(); |   99   params.redirects = std::vector<GURL>(); | 
|  102   params.should_update_history = true; |  100   params.should_update_history = true; | 
|  103   params.searchable_form_url = GURL(); |  101   params.searchable_form_url = GURL(); | 
|  104   params.searchable_form_encoding = std::string(); |  102   params.searchable_form_encoding = std::string(); | 
|  105   params.security_info = std::string(); |  103   params.security_info = std::string(); | 
|  106   params.gesture = NavigationGestureUser; |  104   params.gesture = NavigationGestureUser; | 
|  107   params.contents_mime_type = contents_mime_type_; |  105   params.contents_mime_type = contents_mime_type_; | 
|  108   params.is_post = false; |  106   params.is_post = false; | 
|  109   params.was_within_same_page = false; |  107   params.was_within_same_page = false; | 
|  110   params.http_status_code = response_code; |  108   params.http_status_code = response_code; | 
|  111   params.socket_address.set_host("2001:db8::1"); |  109   params.socket_address.set_host("2001:db8::1"); | 
|  112   params.socket_address.set_port(80); |  110   params.socket_address.set_port(80); | 
|  113   params.history_list_was_cleared = simulate_history_list_was_cleared_; |  111   params.history_list_was_cleared = simulate_history_list_was_cleared_; | 
|  114   params.original_request_url = original_request_url; |  112   params.original_request_url = original_request_url; | 
|  115  |  113  | 
|  116   params.page_state = PageState::CreateForTesting( |  114   params.page_state = PageState::CreateForTesting( | 
|  117       url, |  115       url, | 
|  118       false, |  116       false, | 
|  119       file_path_for_history_item ? "data" : NULL, |  117       file_path_for_history_item ? "data" : NULL, | 
|  120       file_path_for_history_item); |  118       file_path_for_history_item); | 
|  121  |  119  | 
|  122   FrameHostMsg_DidCommitProvisionalLoad msg(1, params); |  120   FrameHostMsg_DidCommitProvisionalLoad msg(1, params); | 
|  123   OnNavigate(msg); |  121   OnNavigate(msg); | 
|  124 } |  122 } | 
|  125  |  123  | 
|  126 }  // namespace content |  124 }  // namespace content | 
| OLD | NEW |