Chromium Code Reviews| Index: public/testing/WebFrameTestProxy.h |
| diff --git a/public/testing/WebFrameTestProxy.h b/public/testing/WebFrameTestProxy.h |
| index 4ff6c2a235a28ebd0907a1a5b4583fc2c09bf8bf..730fb3d6e8a6455005217e5378b846a87c4ef03d 100644 |
| --- a/public/testing/WebFrameTestProxy.h |
| +++ b/public/testing/WebFrameTestProxy.h |
| @@ -38,11 +38,12 @@ namespace WebTestRunner { |
| // Templetized wrapper around RenderFrameImpl objects, which implement |
| // the WebFrameClient interface. |
| template<class Base, typename P, typename R> |
| -class WebFrameTestProxy : public Base, public WebTestProxyBase { |
| +class WebFrameTestProxy : public Base { |
| public: |
| WebFrameTestProxy(P p, R r) |
| : Base(p, r) |
| { |
| + m_baseProxy = 0; |
|
jochen (gone - plz use gerrit)
2013/06/28 08:48:24
nit: move to initializer list
nasko
2013/06/28 15:12:48
Done.
|
| } |
| virtual ~WebFrameTestProxy() { } |
| @@ -54,136 +55,118 @@ public: |
| // WebFrameClient implementation. |
| virtual void willPerformClientRedirect(WebKit::WebFrame* frame, const WebKit::WebURL& from, const WebKit::WebURL& to, double interval, double fireTime) |
| { |
| - m_baseProxy->willPerformClientRedirect(frame, from, to, interval, fireTime); |
| Base::willPerformClientRedirect(frame, from, to, interval, fireTime); |
| } |
| virtual void didCancelClientRedirect(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didCancelClientRedirect(frame); |
| Base::didCancelClientRedirect(frame); |
| } |
| virtual void didStartProvisionalLoad(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didStartProvisionalLoad(frame); |
| Base::didStartProvisionalLoad(frame); |
| } |
| virtual void didReceiveServerRedirectForProvisionalLoad(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didReceiveServerRedirectForProvisionalLoad(frame); |
| Base::didReceiveServerRedirectForProvisionalLoad(frame); |
| } |
| virtual void didFailProvisionalLoad(WebKit::WebFrame* frame, const WebKit::WebURLError& error) |
| { |
| - // If the test finished, don't notify the embedder of the failed load, |
| - // as we already destroyed the document loader. |
| - if (m_baseProxy->didFailProvisionalLoad(frame, error)) |
| - return; |
| Base::didFailProvisionalLoad(frame, error); |
| } |
| virtual void didCommitProvisionalLoad(WebKit::WebFrame* frame, bool isNewNavigation) |
| { |
| - m_baseProxy->didCommitProvisionalLoad(frame, isNewNavigation); |
| Base::didCommitProvisionalLoad(frame, isNewNavigation); |
| } |
| virtual void didReceiveTitle(WebKit::WebFrame* frame, const WebKit::WebString& title, WebKit::WebTextDirection direction) |
| { |
| - m_baseProxy->didReceiveTitle(frame, title, direction); |
| Base::didReceiveTitle(frame, title, direction); |
| } |
| virtual void didChangeIcon(WebKit::WebFrame* frame, WebKit::WebIconURL::Type iconType) |
| { |
| - m_baseProxy->didChangeIcon(frame, iconType); |
| Base::didChangeIcon(frame, iconType); |
| } |
| virtual void didFinishDocumentLoad(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didFinishDocumentLoad(frame); |
| Base::didFinishDocumentLoad(frame); |
| } |
| virtual void didHandleOnloadEvents(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didHandleOnloadEvents(frame); |
| Base::didHandleOnloadEvents(frame); |
| } |
| virtual void didFailLoad(WebKit::WebFrame* frame, const WebKit::WebURLError& error) |
| { |
| - m_baseProxy->didFailLoad(frame, error); |
| Base::didFailLoad(frame, error); |
| } |
| virtual void didFinishLoad(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didFinishLoad(frame); |
| Base::didFinishLoad(frame); |
| } |
| virtual void didChangeLocationWithinPage(WebKit::WebFrame* frame) |
| { |
| + // This is not implemented in RenderFrameImpl, so need to explicitly call |
| + // into the base proxy. |
|
jochen (gone - plz use gerrit)
2013/06/28 08:48:24
why not implement all these in RenderFrameImpl?
nasko
2013/06/28 15:12:48
They aren't implemented in RenderViewImpl either,
|
| m_baseProxy->didChangeLocationWithinPage(frame); |
| Base::didChangeLocationWithinPage(frame); |
| } |
| virtual void didDisplayInsecureContent(WebKit::WebFrame* frame) |
| { |
| - m_baseProxy->didDisplayInsecureContent(frame); |
| Base::didDisplayInsecureContent(frame); |
| } |
| virtual void didRunInsecureContent(WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin, const WebKit::WebURL& insecureURL) |
| { |
| - m_baseProxy->didRunInsecureContent(frame, origin, insecureURL); |
| Base::didRunInsecureContent(frame, origin, insecureURL); |
| } |
| virtual void didDetectXSS(WebKit::WebFrame* frame, const WebKit::WebURL& insecureURL, bool didBlockEntirePage) |
| { |
| + // This is not implemented in RenderFrameImpl, so need to explicitly call |
| + // into the base proxy. |
| m_baseProxy->didDetectXSS(frame, insecureURL, didBlockEntirePage); |
| Base::didDetectXSS(frame, insecureURL, didBlockEntirePage); |
| } |
| virtual void willRequestResource(WebKit::WebFrame* frame, const WebKit::WebCachedURLRequest& request) |
| { |
| + // This is not implemented in RenderFrameImpl, so need to explicitly call |
| + // into the base proxy. |
| m_baseProxy->willRequestResource(frame, request); |
| Base::willRequestResource(frame, request); |
| } |
| virtual WebKit::WebURLError cannotHandleRequestError(WebKit::WebFrame* frame, const WebKit::WebURLRequest& request) |
| { |
| - return m_baseProxy->cannotHandleRequestError(frame, request); |
| + return Base::cannotHandleRequestError(frame, request); |
| } |
| virtual void didCreateDataSource(WebKit::WebFrame* frame, WebKit::WebDataSource* ds) |
| { |
| - m_baseProxy->didCreateDataSource(frame, ds); |
| Base::didCreateDataSource(frame, ds); |
| } |
| virtual void willSendRequest(WebKit::WebFrame* frame, unsigned identifier, WebKit::WebURLRequest& request, const WebKit::WebURLResponse& redirectResponse) |
| { |
| - m_baseProxy->willSendRequest(frame, identifier, request, redirectResponse); |
| Base::willSendRequest(frame, identifier, request, redirectResponse); |
| } |
| virtual void didReceiveResponse(WebKit::WebFrame* frame, unsigned identifier, const WebKit::WebURLResponse& response) |
| { |
| - m_baseProxy->didReceiveResponse(frame, identifier, response); |
| Base::didReceiveResponse(frame, identifier, response); |
| } |
| virtual void didChangeResourcePriority(WebKit::WebFrame* frame, unsigned identifier, const WebKit::WebURLRequest::Priority& priority) |
| { |
| + // This is not implemented in RenderFrameImpl, so need to explicitly call |
| + // into the base proxy. |
| m_baseProxy->didChangeResourcePriority(frame, identifier, priority); |
| Base::didChangeResourcePriority(frame, identifier, priority); |
| } |
| virtual void didFinishResourceLoad(WebKit::WebFrame* frame, unsigned identifier) |
| { |
| - m_baseProxy->didFinishResourceLoad(frame, identifier); |
| Base::didFinishResourceLoad(frame, identifier); |
| } |
| virtual void didFailResourceLoad(WebKit::WebFrame* frame, unsigned identifier, const WebKit::WebURLError& error) |
| { |
| - m_baseProxy->didFailResourceLoad(frame, identifier, error); |
| Base::didFailResourceLoad(frame, identifier, error); |
| } |
| virtual void unableToImplementPolicyWithError(WebKit::WebFrame* frame, const WebKit::WebURLError& error) |
| { |
| - m_baseProxy->unableToImplementPolicyWithError(frame, error); |
| Base::unableToImplementPolicyWithError(frame, error); |
| } |
| virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationType type, WebKit::WebNavigationPolicy defaultPolicy, bool isRedirect) |
| { |
| - WebKit::WebNavigationPolicy policy = m_baseProxy->decidePolicyForNavigation(frame, request, type, defaultPolicy, isRedirect); |
| - if (policy == WebKit::WebNavigationPolicyIgnore) |
| - return policy; |
| return Base::decidePolicyForNavigation(frame, request, type, defaultPolicy, isRedirect); |
| } |
| virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* sourceFrame, WebKit::WebFrame* targetFrame, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent event) |
| @@ -192,11 +175,6 @@ public: |
| return true; |
| return Base::willCheckAndDispatchMessageEvent(sourceFrame, targetFrame, target, event); |
| } |
| - virtual WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserClient* client, const WebKit::WebColor& color) |
| - { |
| - return m_baseProxy->createColorChooser(client, color); |
| - } |
| - |
| private: |
| WebTestProxyBase* m_baseProxy; |