Chromium Code Reviews| Index: content/test/test_render_frame.cc |
| diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc |
| index f8ccea2d6de77dcbbb4e115e259acc209d6cff30..23476a7a08432de08fdaafc20227377d714ce75e 100644 |
| --- a/content/test/test_render_frame.cc |
| +++ b/content/test/test_render_frame.cc |
| @@ -8,6 +8,7 @@ |
| #include "content/common/resource_request_body_impl.h" |
| #include "content/public/common/browser_side_navigation_policy.h" |
| #include "content/public/common/resource_response.h" |
| +#include "third_party/WebKit/public/web/WebLocalFrame.h" |
| namespace content { |
| @@ -70,4 +71,18 @@ void TestRenderFrame::SetCompositionFromExistingText( |
| OnSetCompositionFromExistingText(start, end, underlines); |
| } |
| +blink::WebNavigationPolicy TestRenderFrame::decidePolicyForNavigation( |
| + const blink::WebFrameClient::NavigationPolicyInfo& info) { |
| + if (IsBrowserSideNavigationEnabled() && |
| + info.urlRequest.checkForBrowserSideNavigation() && |
| + GetWebFrame()->parent() && |
| + info.form.isNull()) { |
| + // RenderViewTest::LoadHTML already disables PlzNavigate for the main frame |
| + // requests. However if the loaded html has a subframe, the WebURLRequest |
| + // will be created inside Blink and it wono't have this flag set. |
|
jam39
2016/12/08 16:19:01
won't *
|
| + info.urlRequest.setCheckForBrowserSideNavigation(false); |
| + } |
| + return RenderFrameImpl::decidePolicyForNavigation(info); |
| +} |
| + |
| } // namespace content |