| 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/browser/frame_host/render_frame_host_delegate.h" | 8 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
| 10 #include "content/test/test_render_view_host.h" | 10 #include "content/test/test_render_view_host.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 child_creation_observer_.last_created_frame()); | 63 child_creation_observer_.last_created_frame()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void TestRenderFrameHost::SendNavigateWithTransition( | 66 void TestRenderFrameHost::SendNavigateWithTransition( |
| 67 int page_id, | 67 int page_id, |
| 68 const GURL& url, | 68 const GURL& url, |
| 69 ui::PageTransition transition) { | 69 ui::PageTransition transition) { |
| 70 SendNavigateWithTransitionAndResponseCode(page_id, url, transition, 200); | 70 SendNavigateWithTransitionAndResponseCode(page_id, url, transition, 200); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void TestRenderFrameHost::SendBeforeUnloadACK(bool proceed) { |
| 74 base::TimeTicks now = base::TimeTicks::Now(); |
| 75 OnBeforeUnloadACK(proceed, now, now); |
| 76 } |
| 77 |
| 78 void TestRenderFrameHost::SimulateSwapOutACK() { |
| 79 OnSwappedOut(); |
| 80 } |
| 81 |
| 73 void TestRenderFrameHost::SendNavigate(int page_id, const GURL& url) { | 82 void TestRenderFrameHost::SendNavigate(int page_id, const GURL& url) { |
| 74 SendNavigateWithTransition(page_id, url, ui::PAGE_TRANSITION_LINK); | 83 SendNavigateWithTransition(page_id, url, ui::PAGE_TRANSITION_LINK); |
| 75 } | 84 } |
| 76 | 85 |
| 77 void TestRenderFrameHost::SendFailedNavigate(int page_id, const GURL& url) { | 86 void TestRenderFrameHost::SendFailedNavigate(int page_id, const GURL& url) { |
| 78 SendNavigateWithTransitionAndResponseCode( | 87 SendNavigateWithTransitionAndResponseCode( |
| 79 page_id, url, ui::PAGE_TRANSITION_RELOAD, 500); | 88 page_id, url, ui::PAGE_TRANSITION_RELOAD, 500); |
| 80 } | 89 } |
| 81 | 90 |
| 82 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode( | 91 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode( |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 params.should_replace_current_entry = false; | 186 params.should_replace_current_entry = false; |
| 178 params.allow_download = true; | 187 params.allow_download = true; |
| 179 OnBeginNavigation(params); | 188 OnBeginNavigation(params); |
| 180 } | 189 } |
| 181 | 190 |
| 182 void TestRenderFrameHost::DidDisownOpener() { | 191 void TestRenderFrameHost::DidDisownOpener() { |
| 183 OnDidDisownOpener(); | 192 OnDidDisownOpener(); |
| 184 } | 193 } |
| 185 | 194 |
| 186 } // namespace content | 195 } // namespace content |
| OLD | NEW |