| 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 COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "components/test_runner/mock_screen_orientation_client.h" | 9 #include "components/test_runner/mock_screen_orientation_client.h" |
| 10 #include "components/test_runner/web_test_delegate.h" | 10 #include "components/test_runner/web_test_delegate.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual void loadURLExternally(blink::WebLocalFrame* frame, | 60 virtual void loadURLExternally(blink::WebLocalFrame* frame, |
| 61 const blink::WebURLRequest& request, | 61 const blink::WebURLRequest& request, |
| 62 blink::WebNavigationPolicy policy, | 62 blink::WebNavigationPolicy policy, |
| 63 const blink::WebString& suggested_name) { | 63 const blink::WebString& suggested_name) { |
| 64 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); | 64 base_proxy_->LoadURLExternally(frame, request, policy, suggested_name); |
| 65 Base::loadURLExternally(frame, request, policy, suggested_name); | 65 Base::loadURLExternally(frame, request, policy, suggested_name); |
| 66 } | 66 } |
| 67 | 67 |
| 68 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame, | 68 virtual void didStartProvisionalLoad(blink::WebDataSource* datasource, |
| 69 double triggeringEventTime) { | 69 double triggeringEventTime) { |
| 70 base_proxy_->DidStartProvisionalLoad(frame); | 70 base_proxy_->DidStartProvisionalLoad(Base::GetWebFrame()); |
| 71 Base::didStartProvisionalLoad( | 71 Base::didStartProvisionalLoad(datasource, triggeringEventTime); |
| 72 frame, triggeringEventTime); | |
| 73 } | 72 } |
| 74 | 73 |
| 75 virtual void didReceiveServerRedirectForProvisionalLoad( | 74 virtual void didReceiveServerRedirectForProvisionalLoad( |
| 76 blink::WebLocalFrame* frame) { | 75 blink::WebLocalFrame* frame) { |
| 77 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); | 76 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); |
| 78 Base::didReceiveServerRedirectForProvisionalLoad(frame); | 77 Base::didReceiveServerRedirectForProvisionalLoad(frame); |
| 79 } | 78 } |
| 80 | 79 |
| 81 virtual void didFailProvisionalLoad( | 80 virtual void didFailProvisionalLoad(blink::WebDataSource* datasource, |
| 82 blink::WebLocalFrame* frame, | 81 const blink::WebURLError& error, |
| 83 const blink::WebURLError& error, | 82 blink::WebHistoryCommitType commit_type) { |
| 84 blink::WebHistoryCommitType commit_type) { | 83 base_proxy_->DidFailProvisionalLoad(Base::GetWebFrame(), error, |
| 85 // If the test finished, don't notify the embedder of the failed load, | 84 commit_type); |
| 86 // as we already destroyed the document loader. | 85 Base::didFailProvisionalLoad(datasource, error, commit_type); |
| 87 if (base_proxy_->DidFailProvisionalLoad(frame, error, commit_type)) | |
| 88 return; | |
| 89 Base::didFailProvisionalLoad(frame, error, commit_type); | |
| 90 } | 86 } |
| 91 | 87 |
| 92 virtual void didCommitProvisionalLoad( | 88 virtual void didCommitProvisionalLoad( |
| 93 blink::WebLocalFrame* frame, | 89 blink::WebLocalFrame* frame, |
| 94 const blink::WebHistoryItem& item, | 90 const blink::WebHistoryItem& item, |
| 95 blink::WebHistoryCommitType commit_type) { | 91 blink::WebHistoryCommitType commit_type) { |
| 96 base_proxy_->DidCommitProvisionalLoad(frame, item, commit_type); | 92 base_proxy_->DidCommitProvisionalLoad(frame, item, commit_type); |
| 97 Base::didCommitProvisionalLoad(frame, item, commit_type); | 93 Base::didCommitProvisionalLoad(frame, item, commit_type); |
| 98 } | 94 } |
| 99 | 95 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 113 virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame, bool empty) { | 109 virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame, bool empty) { |
| 114 base_proxy_->DidFinishDocumentLoad(frame); | 110 base_proxy_->DidFinishDocumentLoad(frame); |
| 115 Base::didFinishDocumentLoad(frame, empty); | 111 Base::didFinishDocumentLoad(frame, empty); |
| 116 } | 112 } |
| 117 | 113 |
| 118 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame) { | 114 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame) { |
| 119 base_proxy_->DidHandleOnloadEvents(frame); | 115 base_proxy_->DidHandleOnloadEvents(frame); |
| 120 Base::didHandleOnloadEvents(frame); | 116 Base::didHandleOnloadEvents(frame); |
| 121 } | 117 } |
| 122 | 118 |
| 123 virtual void didFailLoad(blink::WebLocalFrame* frame, | 119 virtual void didFailLoad(blink::WebDataSource* datasource, |
| 124 const blink::WebURLError& error, | 120 const blink::WebURLError& error, |
| 125 blink::WebHistoryCommitType commit_type) { | 121 blink::WebHistoryCommitType commit_type) { |
| 126 base_proxy_->DidFailLoad(frame, error, commit_type); | 122 base_proxy_->DidFailLoad(Base::GetWebFrame(), error, commit_type); |
| 127 Base::didFailLoad(frame, error, commit_type); | 123 Base::didFailLoad(datasource, error, commit_type); |
| 128 } | 124 } |
| 129 | 125 |
| 130 virtual void didFinishLoad(blink::WebLocalFrame* frame) { | 126 virtual void didFinishLoad(blink::WebLocalFrame* frame) { |
| 131 Base::didFinishLoad(frame); | 127 Base::didFinishLoad(frame); |
| 132 base_proxy_->DidFinishLoad(frame); | 128 base_proxy_->DidFinishLoad(frame); |
| 133 } | 129 } |
| 134 | 130 |
| 135 virtual void didChangeSelection(bool is_selection_empty) { | 131 virtual void didChangeSelection(bool is_selection_empty) { |
| 136 base_proxy_->DidChangeSelection(is_selection_empty); | 132 base_proxy_->DidChangeSelection(is_selection_empty); |
| 137 Base::didChangeSelection(is_selection_empty); | 133 Base::didChangeSelection(is_selection_empty); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // into the base proxy. | 189 // into the base proxy. |
| 194 base_proxy_->DidDispatchPingLoader(frame, url); | 190 base_proxy_->DidDispatchPingLoader(frame, url); |
| 195 Base::didDispatchPingLoader(frame, url); | 191 Base::didDispatchPingLoader(frame, url); |
| 196 } | 192 } |
| 197 | 193 |
| 198 virtual void didCreateDataSource(blink::WebLocalFrame* frame, | 194 virtual void didCreateDataSource(blink::WebLocalFrame* frame, |
| 199 blink::WebDataSource* ds) { | 195 blink::WebDataSource* ds) { |
| 200 Base::didCreateDataSource(frame, ds); | 196 Base::didCreateDataSource(frame, ds); |
| 201 } | 197 } |
| 202 | 198 |
| 203 virtual void willSendRequest(blink::WebLocalFrame* frame, | 199 virtual void willSendRequest(blink::WebDataSource* datasource, |
| 204 unsigned identifier, | 200 unsigned identifier, |
| 205 blink::WebURLRequest& request, | 201 blink::WebURLRequest& request, |
| 206 const blink::WebURLResponse& redirect_response) { | 202 const blink::WebURLResponse& redirect_response) { |
| 207 Base::willSendRequest(frame, identifier, request, redirect_response); | 203 Base::willSendRequest(datasource, identifier, request, redirect_response); |
| 208 base_proxy_->WillSendRequest(frame, identifier, request, redirect_response); | 204 base_proxy_->WillSendRequest(identifier, request, redirect_response); |
| 209 } | 205 } |
| 210 | 206 |
| 211 virtual void didReceiveResponse(blink::WebLocalFrame* frame, | 207 virtual void didReceiveResponse(blink::WebLocalFrame* frame, |
| 212 unsigned identifier, | 208 unsigned identifier, |
| 213 const blink::WebURLResponse& response) { | 209 const blink::WebURLResponse& response) { |
| 214 base_proxy_->DidReceiveResponse(frame, identifier, response); | 210 base_proxy_->DidReceiveResponse(frame, identifier, response); |
| 215 Base::didReceiveResponse(frame, identifier, response); | 211 Base::didReceiveResponse(frame, identifier, response); |
| 216 } | 212 } |
| 217 | 213 |
| 218 virtual void didChangeResourcePriority( | 214 virtual void didChangeResourcePriority( |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 275 |
| 280 private: | 276 private: |
| 281 WebTestProxyBase* base_proxy_; | 277 WebTestProxyBase* base_proxy_; |
| 282 | 278 |
| 283 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 279 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
| 284 }; | 280 }; |
| 285 | 281 |
| 286 } // namespace test_runner | 282 } // namespace test_runner |
| 287 | 283 |
| 288 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 284 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| OLD | NEW |