OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/content_browser_test_utils_internal.h" | 5 #include "content/test/content_browser_test_utils_internal.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "content/browser/frame_host/render_frame_host_delegate.h" | 23 #include "content/browser/frame_host/render_frame_host_delegate.h" |
24 #include "content/browser/frame_host/render_frame_proxy_host.h" | 24 #include "content/browser/frame_host/render_frame_proxy_host.h" |
25 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 25 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
26 #include "content/browser/renderer_host/delegated_frame_host.h" | 26 #include "content/browser/renderer_host/delegated_frame_host.h" |
27 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 27 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
28 #include "content/public/browser/navigation_handle.h" | 28 #include "content/public/browser/navigation_handle.h" |
29 #include "content/public/browser/render_frame_host.h" | 29 #include "content/public/browser/render_frame_host.h" |
30 #include "content/public/browser/resource_dispatcher_host.h" | 30 #include "content/public/browser/resource_dispatcher_host.h" |
31 #include "content/public/browser/resource_throttle.h" | 31 #include "content/public/browser/resource_throttle.h" |
32 #include "content/public/common/file_chooser_file_info.h" | 32 #include "content/public/common/file_chooser_file_info.h" |
33 #include "content/public/common/file_chooser_params.h" | |
34 #include "content/public/test/browser_test_utils.h" | 33 #include "content/public/test/browser_test_utils.h" |
35 #include "content/public/test/content_browser_test_utils.h" | 34 #include "content/public/test/content_browser_test_utils.h" |
36 #include "content/shell/browser/shell.h" | 35 #include "content/shell/browser/shell.h" |
37 #include "content/shell/browser/shell_javascript_dialog_manager.h" | 36 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
38 #include "content/test/test_frame_navigation_observer.h" | 37 #include "content/test/test_frame_navigation_observer.h" |
39 #include "net/url_request/url_request.h" | 38 #include "net/url_request/url_request.h" |
40 | 39 |
41 namespace content { | 40 namespace content { |
42 | 41 |
43 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) { | 42 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 void FileChooserDelegate::RunFileChooser(RenderFrameHost* render_frame_host, | 349 void FileChooserDelegate::RunFileChooser(RenderFrameHost* render_frame_host, |
351 const FileChooserParams& params) { | 350 const FileChooserParams& params) { |
352 // Send the selected file to the renderer process. | 351 // Send the selected file to the renderer process. |
353 FileChooserFileInfo file_info; | 352 FileChooserFileInfo file_info; |
354 file_info.file_path = file_; | 353 file_info.file_path = file_; |
355 std::vector<FileChooserFileInfo> files; | 354 std::vector<FileChooserFileInfo> files; |
356 files.push_back(file_info); | 355 files.push_back(file_info); |
357 render_frame_host->FilesSelectedInChooser(files, FileChooserParams::Open); | 356 render_frame_host->FilesSelectedInChooser(files, FileChooserParams::Open); |
358 | 357 |
359 file_chosen_ = true; | 358 file_chosen_ = true; |
| 359 params_ = params; |
360 } | 360 } |
361 | 361 |
362 FrameTestNavigationManager::FrameTestNavigationManager( | 362 FrameTestNavigationManager::FrameTestNavigationManager( |
363 int filtering_frame_tree_node_id, | 363 int filtering_frame_tree_node_id, |
364 WebContents* web_contents, | 364 WebContents* web_contents, |
365 const GURL& url) | 365 const GURL& url) |
366 : TestNavigationManager(web_contents, url), | 366 : TestNavigationManager(web_contents, url), |
367 filtering_frame_tree_node_id_(filtering_frame_tree_node_id) {} | 367 filtering_frame_tree_node_id_(filtering_frame_tree_node_id) {} |
368 | 368 |
369 bool FrameTestNavigationManager::ShouldMonitorNavigation( | 369 bool FrameTestNavigationManager::ShouldMonitorNavigation( |
(...skipping 21 matching lines...) Expand all Loading... |
391 NavigationHandle* navigation_handle) { | 391 NavigationHandle* navigation_handle) { |
392 if (navigation_handle->HasCommitted() && | 392 if (navigation_handle->HasCommitted() && |
393 !navigation_handle->IsErrorPage() && | 393 !navigation_handle->IsErrorPage() && |
394 navigation_handle->GetURL() == url_ && | 394 navigation_handle->GetURL() == url_ && |
395 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) { | 395 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) { |
396 message_loop_runner_->Quit(); | 396 message_loop_runner_->Quit(); |
397 } | 397 } |
398 } | 398 } |
399 | 399 |
400 } // namespace content | 400 } // namespace content |
OLD | NEW |