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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
9 #include "content/browser/frame_host/navigation_request.h" | 9 #include "content/browser/frame_host/navigation_request.h" |
10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 if (!redirect_url.is_empty()) | 261 if (!redirect_url.is_empty()) |
262 url_loader->SimulateServerRedirect(redirect_url); | 262 url_loader->SimulateServerRedirect(redirect_url); |
263 | 263 |
264 // Simulate the network stack commit. | 264 // Simulate the network stack commit. |
265 scoped_refptr<ResourceResponse> response(new ResourceResponse); | 265 scoped_refptr<ResourceResponse> response(new ResourceResponse); |
266 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to | 266 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to |
267 // fully commit the navigation at this call to CallOnResponseStarted. | 267 // fully commit the navigation at this call to CallOnResponseStarted. |
268 url_loader->CallOnResponseStarted(response, MakeEmptyStream()); | 268 url_loader->CallOnResponseStarted(response, MakeEmptyStream()); |
269 } | 269 } |
270 | 270 |
271 void TestRenderFrameHost::SendBeforeUnloadHandlersPresent(bool present) { | |
272 OnBeforeUnloadHandlersPresent(present); | |
273 } | |
274 | |
275 void TestRenderFrameHost::SendUnloadHandlersPresent(bool present) { | |
276 OnUnloadHandlersPresent(present); | |
277 } | |
278 | |
279 } // namespace content | 271 } // namespace content |
OLD | NEW |