| 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/shell/renderer/test_runner/TestInterfaces.h" | 9 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
| 10 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 10 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 virtual void loadURLExternally(blink::WebLocalFrame* frame, | 59 virtual void loadURLExternally(blink::WebLocalFrame* frame, |
| 60 const blink::WebURLRequest& request, | 60 const blink::WebURLRequest& request, |
| 61 blink::WebNavigationPolicy policy, | 61 blink::WebNavigationPolicy policy, |
| 62 const blink::WebString& suggested_name) { | 62 const blink::WebString& suggested_name) { |
| 63 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); | 63 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); |
| 64 Base::loadURLExternally(frame, request, policy, suggested_name); | 64 Base::loadURLExternally(frame, request, policy, suggested_name); |
| 65 } | 65 } |
| 66 | 66 |
| 67 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame) { | 67 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame, |
| 68 bool isTransitionNavigation) { |
| 68 base_proxy_->DidStartProvisionalLoad(frame); | 69 base_proxy_->DidStartProvisionalLoad(frame); |
| 69 Base::didStartProvisionalLoad(frame); | 70 Base::didStartProvisionalLoad(frame, isTransitionNavigation); |
| 70 } | 71 } |
| 71 | 72 |
| 72 virtual void didReceiveServerRedirectForProvisionalLoad( | 73 virtual void didReceiveServerRedirectForProvisionalLoad( |
| 73 blink::WebLocalFrame* frame) { | 74 blink::WebLocalFrame* frame) { |
| 74 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); | 75 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); |
| 75 Base::didReceiveServerRedirectForProvisionalLoad(frame); | 76 Base::didReceiveServerRedirectForProvisionalLoad(frame); |
| 76 } | 77 } |
| 77 | 78 |
| 78 virtual void didFailProvisionalLoad(blink::WebLocalFrame* frame, | 79 virtual void didFailProvisionalLoad(blink::WebLocalFrame* frame, |
| 79 const blink::WebURLError& error) { | 80 const blink::WebURLError& error) { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 intra_priority_value); | 232 intra_priority_value); |
| 232 } | 233 } |
| 233 | 234 |
| 234 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, | 235 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, |
| 235 unsigned identifier) { | 236 unsigned identifier) { |
| 236 base_proxy_->DidFinishResourceLoad(frame, identifier); | 237 base_proxy_->DidFinishResourceLoad(frame, identifier); |
| 237 Base::didFinishResourceLoad(frame, identifier); | 238 Base::didFinishResourceLoad(frame, identifier); |
| 238 } | 239 } |
| 239 | 240 |
| 240 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 241 virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
| 241 blink::WebLocalFrame* frame, blink::WebDataSource::ExtraData* extraData, | 242 const blink::WebFrameClient::NavigationPolicyInfo& info) { |
| 242 const blink::WebURLRequest& request, blink::WebNavigationType type, | |
| 243 blink::WebNavigationPolicy defaultPolicy, bool isRedirect) { | |
| 244 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( | 243 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( |
| 245 frame, extraData, request, type, defaultPolicy, isRedirect); | 244 info.frame, info.extraData, info.urlRequest, info.navigationType, |
| 245 info.defaultPolicy, info.isRedirect); |
| 246 if (policy == blink::WebNavigationPolicyIgnore) return policy; | 246 if (policy == blink::WebNavigationPolicyIgnore) return policy; |
| 247 | 247 |
| 248 return Base::decidePolicyForNavigation(frame, extraData, request, type, | 248 return Base::decidePolicyForNavigation(info); |
| 249 defaultPolicy, isRedirect); | |
| 250 } | 249 } |
| 251 | 250 |
| 252 virtual void willStartUsingPeerConnectionHandler( | 251 virtual void willStartUsingPeerConnectionHandler( |
| 253 blink::WebLocalFrame* frame, | 252 blink::WebLocalFrame* frame, |
| 254 blink::WebRTCPeerConnectionHandler* handler) { | 253 blink::WebRTCPeerConnectionHandler* handler) { |
| 255 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. | 254 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. |
| 256 // See http://crbug/363285. | 255 // See http://crbug/363285. |
| 257 } | 256 } |
| 258 | 257 |
| 259 virtual blink::WebUserMediaClient* userMediaClient() { | 258 virtual blink::WebUserMediaClient* userMediaClient() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 288 } | 287 } |
| 289 | 288 |
| 290 WebTestProxyBase* base_proxy_; | 289 WebTestProxyBase* base_proxy_; |
| 291 | 290 |
| 292 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 291 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
| 293 }; | 292 }; |
| 294 | 293 |
| 295 } // namespace content | 294 } // namespace content |
| 296 | 295 |
| 297 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 296 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| OLD | NEW |