| 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 14 matching lines...) Expand all Loading... |
| 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/test/browser_test_utils.h" | 33 #include "content/public/test/browser_test_utils.h" |
| 34 #include "content/public/test/content_browser_test_utils.h" | 34 #include "content/public/test/content_browser_test_utils.h" |
| 35 #include "content/public/test/test_frame_navigation_observer.h" |
| 35 #include "content/shell/browser/shell.h" | 36 #include "content/shell/browser/shell.h" |
| 36 #include "content/shell/browser/shell_javascript_dialog_manager.h" | 37 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
| 37 #include "content/test/test_frame_navigation_observer.h" | |
| 38 #include "net/url_request/url_request.h" | 38 #include "net/url_request/url_request.h" |
| 39 | 39 |
| 40 namespace content { | 40 namespace content { |
| 41 | 41 |
| 42 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) { | 42 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) { |
| 43 TestFrameNavigationObserver observer(node); | 43 TestFrameNavigationObserver observer(node); |
| 44 NavigationController::LoadURLParams params(url); | 44 NavigationController::LoadURLParams params(url); |
| 45 params.transition_type = ui::PAGE_TRANSITION_LINK; | 45 params.transition_type = ui::PAGE_TRANSITION_LINK; |
| 46 params.frame_tree_node_id = node->frame_tree_node_id(); | 46 params.frame_tree_node_id = node->frame_tree_node_id(); |
| 47 node->navigator()->GetController()->LoadURLWithParams(params); | 47 node->navigator()->GetController()->LoadURLWithParams(params); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |