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..7682e3e01f780dc4c064a4d50ec74dbee22640ba 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() && |
ananta
2016/12/08 22:57:05
is this check correct? Should it be !checkforBrows
jam
2016/12/08 23:01:28
The purpose of this if statement is to disable plz
|
+ 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 won't have this flag set. |
+ info.urlRequest.setCheckForBrowserSideNavigation(false); |
+ } |
+ return RenderFrameImpl::decidePolicyForNavigation(info); |
+} |
+ |
} // namespace content |