| 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/macros.h" | 8 #include "base/macros.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" |
| 11 #include "components/test_runner/web_test_interfaces.h" | 11 #include "components/test_runner/web_test_interfaces.h" |
| 12 #include "components/test_runner/web_test_proxy.h" | 12 #include "components/test_runner/web_test_proxy.h" |
| 13 #include "components/test_runner/web_test_runner.h" | 13 #include "components/test_runner/web_test_runner.h" |
| 14 #include "third_party/WebKit/public/platform/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
| 15 | 15 |
| 16 namespace test_runner { | 16 namespace test_runner { |
| 17 | 17 |
| 18 // Templetized wrapper around RenderFrameImpl objects, which implement | 18 // Templetized wrapper around RenderFrameImpl objects, which implement |
| 19 // the WebFrameClient interface. | 19 // the WebFrameClient interface. |
| 20 template <class Base, typename P> | 20 template <class Base, typename P> |
| 21 class WebFrameTestProxy : public Base { | 21 class WebFrameTestProxy : public Base { |
| 22 public: | 22 public: |
| 23 explicit WebFrameTestProxy(P p) : Base(p), base_proxy_(NULL) {} | 23 explicit WebFrameTestProxy(P p) : Base(p), base_proxy_(NULL) {} |
| 24 | 24 |
| 25 virtual ~WebFrameTestProxy() {} | 25 virtual ~WebFrameTestProxy() {} |
| 26 | 26 |
| 27 void set_base_proxy(WebTestProxyBase* proxy) { base_proxy_ = proxy; } | 27 void set_base_proxy(WebTestProxyBase* proxy) { base_proxy_ = proxy; } |
| 28 | 28 |
| 29 // WebFrameClient implementation. | 29 // WebFrameClient implementation. |
| 30 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, | 30 blink::WebPlugin* createPlugin( |
| 31 const blink::WebPluginParams& params) { | 31 blink::WebLocalFrame* frame, |
| 32 const blink::WebPluginParams& params) override { |
| 32 blink::WebPlugin* plugin = base_proxy_->CreatePlugin(frame, params); | 33 blink::WebPlugin* plugin = base_proxy_->CreatePlugin(frame, params); |
| 33 if (plugin) | 34 if (plugin) |
| 34 return plugin; | 35 return plugin; |
| 35 return Base::createPlugin(frame, params); | 36 return Base::createPlugin(frame, params); |
| 36 } | 37 } |
| 37 | 38 |
| 38 virtual blink::WebScreenOrientationClient* webScreenOrientationClient() { | 39 blink::WebScreenOrientationClient* webScreenOrientationClient() override { |
| 39 return base_proxy_->GetScreenOrientationClientMock(); | 40 return base_proxy_->GetScreenOrientationClientMock(); |
| 40 } | 41 } |
| 41 | 42 |
| 42 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 43 void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 43 const blink::WebString& source_name, | 44 const blink::WebString& source_name, |
| 44 unsigned source_line, | 45 unsigned source_line, |
| 45 const blink::WebString& stack_trace) { | 46 const blink::WebString& stack_trace) override { |
| 46 base_proxy_->DidAddMessageToConsole(message, source_name, source_line); | 47 base_proxy_->DidAddMessageToConsole(message, source_name, source_line); |
| 47 Base::didAddMessageToConsole( | 48 Base::didAddMessageToConsole( |
| 48 message, source_name, source_line, stack_trace); | 49 message, source_name, source_line, stack_trace); |
| 49 } | 50 } |
| 50 | 51 |
| 51 virtual bool canCreatePluginWithoutRenderer( | 52 bool canCreatePluginWithoutRenderer( |
| 52 const blink::WebString& mime_type) { | 53 const blink::WebString& mime_type) override { |
| 53 using blink::WebString; | 54 using blink::WebString; |
| 54 | 55 |
| 55 const CR_DEFINE_STATIC_LOCAL( | 56 const CR_DEFINE_STATIC_LOCAL( |
| 56 WebString, suffix, ("-can-create-without-renderer")); | 57 WebString, suffix, ("-can-create-without-renderer")); |
| 57 return mime_type.utf8().find(suffix.utf8()) != std::string::npos; | 58 return mime_type.utf8().find(suffix.utf8()) != std::string::npos; |
| 58 } | 59 } |
| 59 | 60 |
| 60 virtual void loadURLExternally(const blink::WebURLRequest& request, | 61 void loadURLExternally(const blink::WebURLRequest& request, |
| 61 blink::WebNavigationPolicy policy, | 62 blink::WebNavigationPolicy policy, |
| 62 const blink::WebString& suggested_name, | 63 const blink::WebString& suggested_name, |
| 63 bool replaces_current_history_item) { | 64 bool replaces_current_history_item) override { |
| 64 base_proxy_->LoadURLExternally(request, policy, suggested_name, | 65 base_proxy_->LoadURLExternally(request, policy, suggested_name, |
| 65 replaces_current_history_item); | 66 replaces_current_history_item); |
| 66 Base::loadURLExternally(request, policy, suggested_name, | 67 Base::loadURLExternally(request, policy, suggested_name, |
| 67 replaces_current_history_item); | 68 replaces_current_history_item); |
| 68 } | 69 } |
| 69 | 70 |
| 70 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame, | 71 void didStartProvisionalLoad(blink::WebLocalFrame* frame, |
| 71 double triggeringEventTime) { | 72 double triggeringEventTime) override { |
| 72 base_proxy_->DidStartProvisionalLoad(frame); | 73 base_proxy_->DidStartProvisionalLoad(frame); |
| 73 Base::didStartProvisionalLoad( | 74 Base::didStartProvisionalLoad( |
| 74 frame, triggeringEventTime); | 75 frame, triggeringEventTime); |
| 75 } | 76 } |
| 76 | 77 |
| 77 virtual void didReceiveServerRedirectForProvisionalLoad( | 78 void didReceiveServerRedirectForProvisionalLoad( |
| 78 blink::WebLocalFrame* frame) { | 79 blink::WebLocalFrame* frame) override { |
| 79 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); | 80 base_proxy_->DidReceiveServerRedirectForProvisionalLoad(frame); |
| 80 Base::didReceiveServerRedirectForProvisionalLoad(frame); | 81 Base::didReceiveServerRedirectForProvisionalLoad(frame); |
| 81 } | 82 } |
| 82 | 83 |
| 83 virtual void didFailProvisionalLoad( | 84 void didFailProvisionalLoad( |
| 84 blink::WebLocalFrame* frame, | 85 blink::WebLocalFrame* frame, |
| 85 const blink::WebURLError& error, | 86 const blink::WebURLError& error, |
| 86 blink::WebHistoryCommitType commit_type) { | 87 blink::WebHistoryCommitType commit_type) override { |
| 87 // If the test finished, don't notify the embedder of the failed load, | 88 // If the test finished, don't notify the embedder of the failed load, |
| 88 // as we already destroyed the document loader. | 89 // as we already destroyed the document loader. |
| 89 if (base_proxy_->DidFailProvisionalLoad(frame, error, commit_type)) | 90 if (base_proxy_->DidFailProvisionalLoad(frame, error, commit_type)) |
| 90 return; | 91 return; |
| 91 Base::didFailProvisionalLoad(frame, error, commit_type); | 92 Base::didFailProvisionalLoad(frame, error, commit_type); |
| 92 } | 93 } |
| 93 | 94 |
| 94 virtual void didCommitProvisionalLoad( | 95 void didCommitProvisionalLoad( |
| 95 blink::WebLocalFrame* frame, | 96 blink::WebLocalFrame* frame, |
| 96 const blink::WebHistoryItem& item, | 97 const blink::WebHistoryItem& item, |
| 97 blink::WebHistoryCommitType commit_type) { | 98 blink::WebHistoryCommitType commit_type) override { |
| 98 base_proxy_->DidCommitProvisionalLoad(frame, item, commit_type); | 99 base_proxy_->DidCommitProvisionalLoad(frame, item, commit_type); |
| 99 Base::didCommitProvisionalLoad(frame, item, commit_type); | 100 Base::didCommitProvisionalLoad(frame, item, commit_type); |
| 100 } | 101 } |
| 101 | 102 |
| 102 virtual void didReceiveTitle(blink::WebLocalFrame* frame, | 103 void didReceiveTitle(blink::WebLocalFrame* frame, |
| 103 const blink::WebString& title, | 104 const blink::WebString& title, |
| 104 blink::WebTextDirection direction) { | 105 blink::WebTextDirection direction) override { |
| 105 base_proxy_->DidReceiveTitle(frame, title, direction); | 106 base_proxy_->DidReceiveTitle(frame, title, direction); |
| 106 Base::didReceiveTitle(frame, title, direction); | 107 Base::didReceiveTitle(frame, title, direction); |
| 107 } | 108 } |
| 108 | 109 |
| 109 virtual void didChangeIcon(blink::WebLocalFrame* frame, | 110 void didChangeIcon(blink::WebLocalFrame* frame, |
| 110 blink::WebIconURL::Type icon_type) { | 111 blink::WebIconURL::Type icon_type) override { |
| 111 base_proxy_->DidChangeIcon(frame, icon_type); | 112 base_proxy_->DidChangeIcon(frame, icon_type); |
| 112 Base::didChangeIcon(frame, icon_type); | 113 Base::didChangeIcon(frame, icon_type); |
| 113 } | 114 } |
| 114 | 115 |
| 115 virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame, bool empty) { | 116 void didFinishDocumentLoad(blink::WebLocalFrame* frame, bool empty) override { |
| 116 base_proxy_->DidFinishDocumentLoad(frame); | 117 base_proxy_->DidFinishDocumentLoad(frame); |
| 117 Base::didFinishDocumentLoad(frame, empty); | 118 Base::didFinishDocumentLoad(frame, empty); |
| 118 } | 119 } |
| 119 | 120 |
| 120 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame) { | 121 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override { |
| 121 base_proxy_->DidHandleOnloadEvents(frame); | 122 base_proxy_->DidHandleOnloadEvents(frame); |
| 122 Base::didHandleOnloadEvents(frame); | 123 Base::didHandleOnloadEvents(frame); |
| 123 } | 124 } |
| 124 | 125 |
| 125 virtual void didFailLoad(blink::WebLocalFrame* frame, | 126 void didFailLoad(blink::WebLocalFrame* frame, |
| 126 const blink::WebURLError& error, | 127 const blink::WebURLError& error, |
| 127 blink::WebHistoryCommitType commit_type) { | 128 blink::WebHistoryCommitType commit_type) override { |
| 128 base_proxy_->DidFailLoad(frame, error, commit_type); | 129 base_proxy_->DidFailLoad(frame, error, commit_type); |
| 129 Base::didFailLoad(frame, error, commit_type); | 130 Base::didFailLoad(frame, error, commit_type); |
| 130 } | 131 } |
| 131 | 132 |
| 132 virtual void didFinishLoad(blink::WebLocalFrame* frame) { | 133 void didFinishLoad(blink::WebLocalFrame* frame) override { |
| 133 Base::didFinishLoad(frame); | 134 Base::didFinishLoad(frame); |
| 134 base_proxy_->DidFinishLoad(frame); | 135 base_proxy_->DidFinishLoad(frame); |
| 135 } | 136 } |
| 136 | 137 |
| 137 virtual void didChangeSelection(bool is_selection_empty) { | 138 void didChangeSelection(bool is_selection_empty) override { |
| 138 base_proxy_->DidChangeSelection(is_selection_empty); | 139 base_proxy_->DidChangeSelection(is_selection_empty); |
| 139 Base::didChangeSelection(is_selection_empty); | 140 Base::didChangeSelection(is_selection_empty); |
| 140 } | 141 } |
| 141 | 142 |
| 142 virtual blink::WebColorChooser* createColorChooser( | 143 blink::WebColorChooser* createColorChooser( |
| 143 blink::WebColorChooserClient* client, | 144 blink::WebColorChooserClient* client, |
| 144 const blink::WebColor& initial_color, | 145 const blink::WebColor& initial_color, |
| 145 const blink::WebVector<blink::WebColorSuggestion>& suggestions) { | 146 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override { |
| 146 return base_proxy_->CreateColorChooser(client, initial_color, suggestions); | 147 return base_proxy_->CreateColorChooser(client, initial_color, suggestions); |
| 147 } | 148 } |
| 148 | 149 |
| 149 virtual void runModalAlertDialog(const blink::WebString& message) { | 150 void runModalAlertDialog(const blink::WebString& message) override { |
| 150 base_proxy_->GetDelegate()->PrintMessage(std::string("ALERT: ") + | 151 base_proxy_->GetDelegate()->PrintMessage(std::string("ALERT: ") + |
| 151 message.utf8().data() + "\n"); | 152 message.utf8().data() + "\n"); |
| 152 } | 153 } |
| 153 | 154 |
| 154 virtual bool runModalConfirmDialog(const blink::WebString& message) { | 155 bool runModalConfirmDialog(const blink::WebString& message) override { |
| 155 base_proxy_->GetDelegate()->PrintMessage(std::string("CONFIRM: ") + | 156 base_proxy_->GetDelegate()->PrintMessage(std::string("CONFIRM: ") + |
| 156 message.utf8().data() + "\n"); | 157 message.utf8().data() + "\n"); |
| 157 return true; | 158 return true; |
| 158 } | 159 } |
| 159 | 160 |
| 160 virtual bool runModalPromptDialog(const blink::WebString& message, | 161 bool runModalPromptDialog(const blink::WebString& message, |
| 161 const blink::WebString& default_value, | 162 const blink::WebString& default_value, |
| 162 blink::WebString*) { | 163 blink::WebString*) override { |
| 163 base_proxy_->GetDelegate()->PrintMessage( | 164 base_proxy_->GetDelegate()->PrintMessage( |
| 164 std::string("PROMPT: ") + message.utf8().data() + ", default text: " + | 165 std::string("PROMPT: ") + message.utf8().data() + ", default text: " + |
| 165 default_value.utf8().data() + "\n"); | 166 default_value.utf8().data() + "\n"); |
| 166 return true; | 167 return true; |
| 167 } | 168 } |
| 168 | 169 |
| 169 virtual bool runModalBeforeUnloadDialog(bool is_reload, | 170 bool runModalBeforeUnloadDialog(bool is_reload, |
| 170 const blink::WebString& message) { | 171 const blink::WebString& message) override { |
| 171 base_proxy_->GetDelegate()->PrintMessage( | 172 base_proxy_->GetDelegate()->PrintMessage( |
| 172 std::string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n"); | 173 std::string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n"); |
| 173 return !base_proxy_->GetInterfaces() | 174 return !base_proxy_->GetInterfaces() |
| 174 ->TestRunner() | 175 ->TestRunner() |
| 175 ->ShouldStayOnPageAfterHandlingBeforeUnload(); | 176 ->ShouldStayOnPageAfterHandlingBeforeUnload(); |
| 176 } | 177 } |
| 177 | 178 |
| 178 virtual void showContextMenu( | 179 void showContextMenu( |
| 179 const blink::WebContextMenuData& context_menu_data) { | 180 const blink::WebContextMenuData& context_menu_data) override { |
| 180 base_proxy_->ShowContextMenu(context_menu_data); | 181 base_proxy_->ShowContextMenu(context_menu_data); |
| 181 Base::showContextMenu(context_menu_data); | 182 Base::showContextMenu(context_menu_data); |
| 182 } | 183 } |
| 183 | 184 |
| 184 virtual void didDetectXSS(const blink::WebURL& insecure_url, | 185 void didDetectXSS(const blink::WebURL& insecure_url, |
| 185 bool did_block_entire_page) { | 186 bool did_block_entire_page) override { |
| 186 // This is not implemented in RenderFrameImpl, so need to explicitly call | 187 // This is not implemented in RenderFrameImpl, so need to explicitly call |
| 187 // into the base proxy. | 188 // into the base proxy. |
| 188 base_proxy_->DidDetectXSS(insecure_url, did_block_entire_page); | 189 base_proxy_->DidDetectXSS(insecure_url, did_block_entire_page); |
| 189 Base::didDetectXSS(insecure_url, did_block_entire_page); | 190 Base::didDetectXSS(insecure_url, did_block_entire_page); |
| 190 } | 191 } |
| 191 | 192 |
| 192 virtual void didDispatchPingLoader(const blink::WebURL& url) { | 193 void didDispatchPingLoader(const blink::WebURL& url) override { |
| 193 // This is not implemented in RenderFrameImpl, so need to explicitly call | 194 // This is not implemented in RenderFrameImpl, so need to explicitly call |
| 194 // into the base proxy. | 195 // into the base proxy. |
| 195 base_proxy_->DidDispatchPingLoader(url); | 196 base_proxy_->DidDispatchPingLoader(url); |
| 196 Base::didDispatchPingLoader(url); | 197 Base::didDispatchPingLoader(url); |
| 197 } | 198 } |
| 198 | 199 |
| 199 virtual void didCreateDataSource(blink::WebLocalFrame* frame, | 200 void didCreateDataSource(blink::WebLocalFrame* frame, |
| 200 blink::WebDataSource* ds) { | 201 blink::WebDataSource* ds) override { |
| 201 Base::didCreateDataSource(frame, ds); | 202 Base::didCreateDataSource(frame, ds); |
| 202 } | 203 } |
| 203 | 204 |
| 204 virtual void willSendRequest(blink::WebLocalFrame* frame, | 205 void willSendRequest( |
| 205 unsigned identifier, | 206 blink::WebLocalFrame* frame, |
| 206 blink::WebURLRequest& request, | 207 unsigned identifier, |
| 207 const blink::WebURLResponse& redirect_response) { | 208 blink::WebURLRequest& request, |
| 209 const blink::WebURLResponse& redirect_response) override { |
| 208 Base::willSendRequest(frame, identifier, request, redirect_response); | 210 Base::willSendRequest(frame, identifier, request, redirect_response); |
| 209 base_proxy_->WillSendRequest(frame, identifier, request, redirect_response); | 211 base_proxy_->WillSendRequest(frame, identifier, request, redirect_response); |
| 210 } | 212 } |
| 211 | 213 |
| 212 virtual void didReceiveResponse(unsigned identifier, | 214 void didReceiveResponse(unsigned identifier, |
| 213 const blink::WebURLResponse& response) { | 215 const blink::WebURLResponse& response) override { |
| 214 base_proxy_->DidReceiveResponse(identifier, response); | 216 base_proxy_->DidReceiveResponse(identifier, response); |
| 215 Base::didReceiveResponse(identifier, response); | 217 Base::didReceiveResponse(identifier, response); |
| 216 } | 218 } |
| 217 | 219 |
| 218 virtual void didChangeResourcePriority( | 220 void didChangeResourcePriority(unsigned identifier, |
| 219 unsigned identifier, | 221 const blink::WebURLRequest::Priority& priority, |
| 220 const blink::WebURLRequest::Priority& priority, | 222 int intra_priority_value) override { |
| 221 int intra_priority_value) { | |
| 222 // This is not implemented in RenderFrameImpl, so need to explicitly call | 223 // This is not implemented in RenderFrameImpl, so need to explicitly call |
| 223 // into the base proxy. | 224 // into the base proxy. |
| 224 base_proxy_->DidChangeResourcePriority( | 225 base_proxy_->DidChangeResourcePriority( |
| 225 identifier, priority, intra_priority_value); | 226 identifier, priority, intra_priority_value); |
| 226 Base::didChangeResourcePriority( | 227 Base::didChangeResourcePriority( |
| 227 identifier, priority, intra_priority_value); | 228 identifier, priority, intra_priority_value); |
| 228 } | 229 } |
| 229 | 230 |
| 230 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, | 231 void didFinishResourceLoad(blink::WebLocalFrame* frame, |
| 231 unsigned identifier) { | 232 unsigned identifier) override { |
| 232 base_proxy_->DidFinishResourceLoad(frame, identifier); | 233 base_proxy_->DidFinishResourceLoad(frame, identifier); |
| 233 } | 234 } |
| 234 | 235 |
| 235 virtual blink::WebNavigationPolicy decidePolicyForNavigation( | 236 blink::WebNavigationPolicy decidePolicyForNavigation( |
| 236 const blink::WebFrameClient::NavigationPolicyInfo& info) { | 237 const blink::WebFrameClient::NavigationPolicyInfo& info) override { |
| 237 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( | 238 blink::WebNavigationPolicy policy = base_proxy_->DecidePolicyForNavigation( |
| 238 info); | 239 info); |
| 239 if (policy == blink::WebNavigationPolicyIgnore) | 240 if (policy == blink::WebNavigationPolicyIgnore) |
| 240 return policy; | 241 return policy; |
| 241 | 242 |
| 242 return Base::decidePolicyForNavigation(info); | 243 return Base::decidePolicyForNavigation(info); |
| 243 } | 244 } |
| 244 | 245 |
| 245 virtual void willStartUsingPeerConnectionHandler( | 246 void willStartUsingPeerConnectionHandler( |
| 246 blink::WebRTCPeerConnectionHandler* handler) { | 247 blink::WebRTCPeerConnectionHandler* handler) override { |
| 247 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. | 248 // RenderFrameImpl::willStartUsingPeerConnectionHandler can not be mocked. |
| 248 // See http://crbug/363285. | 249 // See http://crbug/363285. |
| 249 } | 250 } |
| 250 | 251 |
| 251 virtual blink::WebUserMediaClient* userMediaClient() { | 252 blink::WebUserMediaClient* userMediaClient() override { |
| 252 return base_proxy_->GetUserMediaClient(); | 253 return base_proxy_->GetUserMediaClient(); |
| 253 } | 254 } |
| 254 | 255 |
| 255 virtual bool willCheckAndDispatchMessageEvent( | 256 bool willCheckAndDispatchMessageEvent( |
| 256 blink::WebLocalFrame* source_frame, | 257 blink::WebLocalFrame* source_frame, |
| 257 blink::WebFrame* target_frame, | 258 blink::WebFrame* target_frame, |
| 258 blink::WebSecurityOrigin target, | 259 blink::WebSecurityOrigin target, |
| 259 blink::WebDOMMessageEvent event) { | 260 blink::WebDOMMessageEvent event) override { |
| 260 if (base_proxy_->WillCheckAndDispatchMessageEvent( | 261 if (base_proxy_->WillCheckAndDispatchMessageEvent( |
| 261 source_frame, target_frame, target, event)) | 262 source_frame, target_frame, target, event)) |
| 262 return true; | 263 return true; |
| 263 return Base::willCheckAndDispatchMessageEvent( | 264 return Base::willCheckAndDispatchMessageEvent( |
| 264 source_frame, target_frame, target, event); | 265 source_frame, target_frame, target, event); |
| 265 } | 266 } |
| 266 | 267 |
| 267 virtual void postAccessibilityEvent(const blink::WebAXObject& object, | 268 void postAccessibilityEvent(const blink::WebAXObject& object, |
| 268 blink::WebAXEvent event) { | 269 blink::WebAXEvent event) override { |
| 269 base_proxy_->PostAccessibilityEvent(object, event); | 270 base_proxy_->PostAccessibilityEvent(object, event); |
| 270 Base::postAccessibilityEvent(object, event); | 271 Base::postAccessibilityEvent(object, event); |
| 271 } | 272 } |
| 272 | 273 |
| 273 virtual void checkIfAudioSinkExistsAndIsAuthorized( | 274 void checkIfAudioSinkExistsAndIsAuthorized( |
| 274 const blink::WebString& sink_id, | 275 const blink::WebString& sink_id, |
| 275 const blink::WebSecurityOrigin& security_origin, | 276 const blink::WebSecurityOrigin& security_origin, |
| 276 blink::WebSetSinkIdCallbacks* web_callbacks) { | 277 blink::WebSetSinkIdCallbacks* web_callbacks) override { |
| 277 base_proxy_->CheckIfAudioSinkExistsAndIsAuthorized(sink_id, security_origin, | 278 base_proxy_->CheckIfAudioSinkExistsAndIsAuthorized(sink_id, security_origin, |
| 278 web_callbacks); | 279 web_callbacks); |
| 279 } | 280 } |
| 280 | 281 |
| 281 private: | 282 private: |
| 282 WebTestProxyBase* base_proxy_; | 283 WebTestProxyBase* base_proxy_; |
| 283 | 284 |
| 284 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); | 285 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); |
| 285 }; | 286 }; |
| 286 | 287 |
| 287 } // namespace test_runner | 288 } // namespace test_runner |
| 288 | 289 |
| 289 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ | 290 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ |
| OLD | NEW |