Index: content/shell/renderer/test_runner/web_test_proxy.h |
diff --git a/content/shell/renderer/test_runner/WebTestProxy.h b/content/shell/renderer/test_runner/web_test_proxy.h |
similarity index 17% |
rename from content/shell/renderer/test_runner/WebTestProxy.h |
rename to content/shell/renderer/test_runner/web_test_proxy.h |
index accb502fe49551e6fc8a3e4c60b659e1dbb68b53..56a3ec7469c6baa4c75e3c9958dde793cec11a3e 100644 |
--- a/content/shell/renderer/test_runner/WebTestProxy.h |
+++ b/content/shell/renderer/test_runner/web_test_proxy.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
-#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
+#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |
#include <deque> |
#include <map> |
@@ -83,300 +83,313 @@ class WebTestInterfaces; |
class WebUserMediaClientMock; |
class WebTestProxyBase : public blink::WebCompositeAndReadbackAsyncCallback { |
-public: |
- void setInterfaces(WebTestInterfaces*); |
- void setDelegate(WebTestDelegate*); |
- void setWidget(blink::WebWidget*); |
- |
- void reset(); |
- |
- blink::WebSpellCheckClient *spellCheckClient() const; |
- blink::WebColorChooser* createColorChooser(blink::WebColorChooserClient*, const blink::WebColor&, const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
- bool runFileChooser(const blink::WebFileChooserParams&, blink::WebFileChooserCompletion*); |
- void showValidationMessage(const blink::WebRect& anchorInRootView, const blink::WebString& mainText, const blink::WebString& supplementalText, blink::WebTextDirection); |
- void hideValidationMessage(); |
- void moveValidationMessage(const blink::WebRect& anchorInRootView); |
- |
- std::string captureTree(bool debugRenderTree); |
- SkCanvas* capturePixels(); |
- void CapturePixelsForPrinting( |
- base::Callback<void(const SkBitmap&)> callback); |
- void CapturePixelsAsync(base::Callback<void(const SkBitmap&)> callback); |
- |
- void setLogConsoleOutput(bool enabled); |
- |
- // FIXME: Make this private again. |
- void scheduleComposite(); |
- |
- void didOpenChooser(); |
- void didCloseChooser(); |
- bool isChooserShown(); |
- |
- void displayAsyncThen(base::Closure callback); |
- |
- void discardBackingStore(); |
- |
- blink::WebMIDIClientMock* midiClientMock(); |
- MockWebSpeechRecognizer* speechRecognizerMock(); |
- |
- WebTaskList* taskList() { return &m_taskList; } |
- |
- blink::WebView* webView(); |
- |
- void didForceResize(); |
- |
- void postSpellCheckEvent(const blink::WebString& eventName); |
- |
- // WebCompositeAndReadbackAsyncCallback implementation. |
- virtual void didCompositeAndReadback(const SkBitmap& bitmap); |
- |
-protected: |
- WebTestProxyBase(); |
- ~WebTestProxyBase(); |
- |
- void didInvalidateRect(const blink::WebRect&); |
- void didScrollRect(int, int, const blink::WebRect&); |
- void scheduleAnimation(); |
- bool isCompositorFramePending() const; |
- // FIXME: Remove once we switch to use didForceResize. |
- void setWindowRect(const blink::WebRect&); |
- void show(blink::WebNavigationPolicy); |
- void didAutoResize(const blink::WebSize&); |
- void postAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); |
- void startDragging(blink::WebLocalFrame*, const blink::WebDragData&, blink::WebDragOperationsMask, const blink::WebImage&, const blink::WebPoint&); |
- void didChangeSelection(bool isEmptySelection); |
- void didChangeContents(); |
- void didEndEditing(); |
- bool createView(blink::WebLocalFrame* creator, const blink::WebURLRequest&, const blink::WebWindowFeatures&, const blink::WebString& frameName, blink::WebNavigationPolicy, bool suppressOpener); |
- blink::WebPlugin* createPlugin(blink::WebLocalFrame*, const blink::WebPluginParams&); |
- void setStatusText(const blink::WebString&); |
- void didStopLoading(); |
- void showContextMenu(blink::WebLocalFrame*, const blink::WebContextMenuData&); |
- blink::WebUserMediaClient* userMediaClient(); |
- void printPage(blink::WebLocalFrame*); |
- blink::WebNotificationPresenter* notificationPresenter(); |
- blink::WebMIDIClient* webMIDIClient(); |
- blink::WebSpeechRecognizer* speechRecognizer(); |
- bool requestPointerLock(); |
- void requestPointerUnlock(); |
- bool isPointerLocked(); |
- void didFocus(); |
- void didBlur(); |
- void setToolTipText(const blink::WebString&, blink::WebTextDirection); |
- void didAddMessageToConsole(const blink::WebConsoleMessage&, const blink::WebString& sourceName, unsigned sourceLine); |
- void loadURLExternally(blink::WebLocalFrame* frame, const blink::WebURLRequest& request, blink::WebNavigationPolicy policy, const blink::WebString& suggested_name); |
- void didStartProvisionalLoad(blink::WebLocalFrame*); |
- void didReceiveServerRedirectForProvisionalLoad(blink::WebLocalFrame*); |
- bool didFailProvisionalLoad(blink::WebLocalFrame*, const blink::WebURLError&); |
- void didCommitProvisionalLoad(blink::WebLocalFrame*, const blink::WebHistoryItem&, blink::WebHistoryCommitType); |
- void didReceiveTitle(blink::WebLocalFrame*, const blink::WebString& title, blink::WebTextDirection); |
- void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); |
- void didFinishDocumentLoad(blink::WebLocalFrame*); |
- void didHandleOnloadEvents(blink::WebLocalFrame*); |
- void didFailLoad(blink::WebLocalFrame*, const blink::WebURLError&); |
- void didFinishLoad(blink::WebLocalFrame*); |
- void didChangeLocationWithinPage(blink::WebLocalFrame*); |
- void didDetectXSS(blink::WebLocalFrame*, const blink::WebURL& insecureURL, bool didBlockEntirePage); |
- void didDispatchPingLoader(blink::WebLocalFrame*, const blink::WebURL&); |
- void willRequestResource(blink::WebLocalFrame*, const blink::WebCachedURLRequest&); |
- void willSendRequest(blink::WebLocalFrame*, unsigned identifier, blink::WebURLRequest&, const blink::WebURLResponse& redirectResponse); |
- void didReceiveResponse(blink::WebLocalFrame*, unsigned identifier, const blink::WebURLResponse&); |
- void didChangeResourcePriority(blink::WebLocalFrame*, unsigned identifier, const blink::WebURLRequest::Priority&, int intra_priority_value); |
- void didFinishResourceLoad(blink::WebLocalFrame*, unsigned identifier); |
- blink::WebNavigationPolicy decidePolicyForNavigation(blink::WebLocalFrame*, blink::WebDataSource::ExtraData*, const blink::WebURLRequest&, blink::WebNavigationType, blink::WebNavigationPolicy defaultPolicy, bool isRedirect); |
- bool willCheckAndDispatchMessageEvent(blink::WebLocalFrame* sourceFrame, blink::WebFrame* targetFrame, blink::WebSecurityOrigin target, blink::WebDOMMessageEvent); |
- void resetInputMethod(); |
- |
-private: |
- template<class, typename, typename> friend class WebFrameTestProxy; |
- void locationChangeDone(blink::WebFrame*); |
- void paintRect(const blink::WebRect&); |
- void paintInvalidatedRegion(); |
- void paintPagesWithBoundaries(); |
- SkCanvas* canvas(); |
- void invalidateAll(); |
- void animateNow(); |
- void DrawSelectionRect(SkCanvas* canvas); |
- void DisplayForSoftwareMode(const base::Closure& callback); |
- void DidDisplayAsync(const base::Closure& callback, const SkBitmap& bitmap); |
- |
- blink::WebWidget* webWidget(); |
- |
- TestInterfaces* m_testInterfaces; |
- WebTestDelegate* m_delegate; |
- blink::WebWidget* m_webWidget; |
- |
- WebTaskList m_taskList; |
- |
- scoped_ptr<SpellCheckClient> m_spellcheck; |
- scoped_ptr<WebUserMediaClientMock> m_userMediaClient; |
- |
- // Painting. |
- scoped_ptr<SkCanvas> m_canvas; |
- blink::WebRect m_paintRect; |
- bool m_isPainting; |
- bool m_animateScheduled; |
- std::map<unsigned, std::string> m_resourceIdentifierMap; |
- std::map<unsigned, blink::WebURLRequest> m_requestMap; |
- std::deque<base::Callback<void(const SkBitmap&)> > |
- m_compositeAndReadbackCallbacks; |
- |
- bool m_logConsoleOutput; |
- int m_chooserCount; |
- |
- scoped_ptr<blink::WebMIDIClientMock> m_midiClient; |
- scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer; |
- |
-private: |
- DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
+ public: |
+ void SetInterfaces(WebTestInterfaces* interfaces); |
+ void SetDelegate(WebTestDelegate* delegate); |
+ void set_widget(blink::WebWidget* widget) { web_widget_ = widget; } |
+ |
+ void Reset(); |
+ |
+ blink::WebSpellCheckClient* GetSpellCheckClient() const; |
+ blink::WebColorChooser* CreateColorChooser( |
+ blink::WebColorChooserClient*, const blink::WebColor&, |
+ const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
+ bool RunFileChooser(const blink::WebFileChooserParams&, |
+ blink::WebFileChooserCompletion*); |
+ void ShowValidationMessage(const blink::WebRect& anchorInRootView, |
+ const blink::WebString& mainText, |
+ const blink::WebString& supplementalText, |
+ blink::WebTextDirection); |
+ void HideValidationMessage(); |
+ void MoveValidationMessage(const blink::WebRect& anchorInRootView); |
+ |
+ std::string CaptureTree(bool debugRenderTree); |
+ SkCanvas* CapturePixels(); |
+ void CapturePixelsForPrinting( |
+ const base::Callback<void(const SkBitmap&)>& callback); |
+ void CapturePixelsAsync( |
+ const base::Callback<void(const SkBitmap&)>& callback); |
+ |
+ void SetLogConsoleOutput(bool enabled); |
+ |
+ // FIXME: Make this private again. |
+ void ScheduleComposite(); |
+ |
+ void DidOpenChooser(); |
+ void DidCloseChooser(); |
+ bool IsChooserShown(); |
+ |
+ void DisplayAsyncThen(const base::Closure& callback); |
+ |
+ void DiscardBackingStore(); |
+ |
+ blink::WebMIDIClientMock* GetMIDIClientMock(); |
+ MockWebSpeechRecognizer* GetSpeechRecognizerMock(); |
+ |
+ WebTaskList* mutable_task_list() { return &task_list_; } |
+ |
+ blink::WebView* GetWebView() const; |
+ |
+ void DidForceResize(); |
+ |
+ void PostSpellCheckEvent(const blink::WebString& eventName); |
+ |
+ // WebCompositeAndReadbackAsyncCallback implementation. |
+ virtual void didCompositeAndReadback(const SkBitmap& bitmap); |
+ |
+ protected: |
+ WebTestProxyBase(); |
+ ~WebTestProxyBase(); |
+ |
+ void DidInvalidateRect(const blink::WebRect&); |
+ void DidScrollRect(int, int, const blink::WebRect&); |
+ void ScheduleAnimation(); |
+ bool IsCompositorFramePending() const; |
+ // FIXME: Remove once we switch to use didForceResize. |
+ void SetWindowRect(const blink::WebRect&); |
+ void Show(blink::WebNavigationPolicy); |
+ void DidAutoResize(const blink::WebSize&); |
+ void PostAccessibilityEvent(const blink::WebAXObject&, blink::WebAXEvent); |
+ void StartDragging(blink::WebLocalFrame*, const blink::WebDragData&, |
+ blink::WebDragOperationsMask, const blink::WebImage&, |
+ const blink::WebPoint&); |
+ void DidChangeSelection(bool isEmptySelection); |
+ void DidChangeContents(); |
+ void DidEndEditing(); |
+ bool CreateView(blink::WebLocalFrame* creator, const blink::WebURLRequest&, |
+ const blink::WebWindowFeatures&, |
+ const blink::WebString& frameName, blink::WebNavigationPolicy, |
+ bool suppressOpener); |
+ blink::WebPlugin* CreatePlugin(blink::WebLocalFrame*, |
+ const blink::WebPluginParams&); |
+ void SetStatusText(const blink::WebString&); |
+ void DidStopLoading(); |
+ void ShowContextMenu(blink::WebLocalFrame*, const blink::WebContextMenuData&); |
+ blink::WebUserMediaClient* GetUserMediaClient(); |
+ void PrintPage(blink::WebLocalFrame*); |
+ blink::WebNotificationPresenter* GetNotificationPresenter(); |
+ blink::WebMIDIClient* GetWebMIDIClient(); |
+ blink::WebSpeechRecognizer* GetSpeechRecognizer(); |
+ bool RequestPointerLock(); |
+ void RequestPointerUnlock(); |
+ bool IsPointerLocked(); |
+ void DidFocus(); |
+ void DidBlur(); |
+ void SetToolTipText(const blink::WebString&, blink::WebTextDirection); |
+ void DidAddMessageToConsole(const blink::WebConsoleMessage&, |
+ const blink::WebString& sourceName, |
+ unsigned sourceLine); |
+ void LoadURLExternally(blink::WebLocalFrame* frame, |
+ const blink::WebURLRequest& request, |
+ blink::WebNavigationPolicy policy, |
+ const blink::WebString& suggested_name); |
+ void DidStartProvisionalLoad(blink::WebLocalFrame*); |
+ void DidReceiveServerRedirectForProvisionalLoad(blink::WebLocalFrame*); |
+ bool DidFailProvisionalLoad(blink::WebLocalFrame*, const blink::WebURLError&); |
+ void DidCommitProvisionalLoad(blink::WebLocalFrame*, |
+ const blink::WebHistoryItem&, |
+ blink::WebHistoryCommitType); |
+ void DidReceiveTitle(blink::WebLocalFrame*, const blink::WebString& title, |
+ blink::WebTextDirection); |
+ void DidChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); |
+ void DidFinishDocumentLoad(blink::WebLocalFrame*); |
+ void DidHandleOnloadEvents(blink::WebLocalFrame*); |
+ void DidFailLoad(blink::WebLocalFrame*, const blink::WebURLError&); |
+ void DidFinishLoad(blink::WebLocalFrame*); |
+ void DidChangeLocationWithinPage(blink::WebLocalFrame*); |
+ void DidDetectXSS(blink::WebLocalFrame*, const blink::WebURL& insecureURL, |
+ bool didBlockEntirePage); |
+ void DidDispatchPingLoader(blink::WebLocalFrame*, const blink::WebURL&); |
+ void WillRequestResource(blink::WebLocalFrame*, |
+ const blink::WebCachedURLRequest&); |
+ void WillSendRequest(blink::WebLocalFrame*, unsigned identifier, |
+ blink::WebURLRequest&, |
+ const blink::WebURLResponse& redirectResponse); |
+ void DidReceiveResponse(blink::WebLocalFrame*, unsigned identifier, |
+ const blink::WebURLResponse&); |
+ void DidChangeResourcePriority(blink::WebLocalFrame*, unsigned identifier, |
+ const blink::WebURLRequest::Priority&, |
+ int intra_priority_value); |
+ void DidFinishResourceLoad(blink::WebLocalFrame*, unsigned identifier); |
+ blink::WebNavigationPolicy DecidePolicyForNavigation( |
+ blink::WebLocalFrame*, blink::WebDataSource::ExtraData*, |
+ const blink::WebURLRequest&, blink::WebNavigationType, |
+ blink::WebNavigationPolicy defaultPolicy, bool isRedirect); |
+ bool WillCheckAndDispatchMessageEvent(blink::WebLocalFrame* sourceFrame, |
+ blink::WebFrame* targetFrame, |
+ blink::WebSecurityOrigin target, |
+ blink::WebDOMMessageEvent); |
+ void ResetInputMethod(); |
+ |
+ private: |
+ template <class, typename, typename> |
+ friend class WebFrameTestProxy; |
+ void LocationChangeDone(blink::WebFrame*); |
+ void PaintRect(const blink::WebRect&); |
+ void PaintInvalidatedRegion(); |
+ void PaintPagesWithBoundaries(); |
+ SkCanvas* GetCanvas(); |
+ void InvalidateAll(); |
+ void AnimateNow(); |
+ void DrawSelectionRect(SkCanvas* canvas); |
+ void DisplayForSoftwareMode(const base::Closure& callback); |
+ void DidDisplayAsync(const base::Closure& callback, const SkBitmap& bitmap); |
+ |
+ blink::WebWidget* web_widget() const { return web_widget_; } |
+ |
+ TestInterfaces* test_interfaces_; |
+ WebTestDelegate* delegate_; |
+ blink::WebWidget* web_widget_; |
+ |
+ WebTaskList task_list_; |
+ |
+ scoped_ptr<SpellCheckClient> spellcheck_; |
+ scoped_ptr<WebUserMediaClientMock> user_media_client_; |
+ |
+ // Painting. |
+ scoped_ptr<SkCanvas> canvas_; |
+ blink::WebRect paint_rect_; |
+ bool is_painting_; |
+ bool animate_scheduled_; |
+ std::map<unsigned, std::string> resource_identifier_map_; |
+ std::deque<base::Callback<void(const SkBitmap&)> > |
+ composite_and_readback_callbacks_; |
+ |
+ bool log_console_output_; |
+ int chooser_count_; |
+ |
+ scoped_ptr<blink::WebMIDIClientMock> m_midiClient; |
+ scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); |
}; |
// Use this template to inject methods into your WebViewClient/WebFrameClient |
// implementation required for the running layout tests. |
-template<class Base, typename T> |
+template <class Base, typename T> |
class WebTestProxy : public Base, public WebTestProxyBase { |
-public: |
- explicit WebTestProxy(T t) |
- : Base(t) |
- { |
- } |
- |
- virtual ~WebTestProxy() { } |
- |
- // WebViewClient implementation. |
- virtual void didInvalidateRect(const blink::WebRect& rect) |
- { |
- WebTestProxyBase::didInvalidateRect(rect); |
- } |
- virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) |
- { |
- WebTestProxyBase::didScrollRect(dx, dy, clipRect); |
- } |
- virtual void scheduleComposite() |
- { |
- WebTestProxyBase::scheduleComposite(); |
- } |
- virtual void scheduleAnimation() |
- { |
- WebTestProxyBase::scheduleAnimation(); |
- } |
- virtual bool isCompositorFramePending() const |
- { |
- return WebTestProxyBase::isCompositorFramePending(); |
- } |
- virtual void setWindowRect(const blink::WebRect& rect) |
- { |
- WebTestProxyBase::setWindowRect(rect); |
- Base::setWindowRect(rect); |
- } |
- virtual void show(blink::WebNavigationPolicy policy) |
- { |
- WebTestProxyBase::show(policy); |
- Base::show(policy); |
- } |
- virtual void didAutoResize(const blink::WebSize& newSize) |
- { |
- WebTestProxyBase::didAutoResize(newSize); |
- Base::didAutoResize(newSize); |
- } |
- virtual void postAccessibilityEvent(const blink::WebAXObject& object, blink::WebAXEvent event) |
- { |
- WebTestProxyBase::postAccessibilityEvent(object, event); |
- Base::postAccessibilityEvent(object, event); |
- } |
- virtual void startDragging(blink::WebLocalFrame* frame, const blink::WebDragData& data, blink::WebDragOperationsMask mask, const blink::WebImage& image, const blink::WebPoint& point) |
- { |
- WebTestProxyBase::startDragging(frame, data, mask, image, point); |
- // Don't forward this call to Base because we don't want to do a real drag-and-drop. |
- } |
- virtual void didChangeContents() |
- { |
- WebTestProxyBase::didChangeContents(); |
- Base::didChangeContents(); |
- } |
- virtual blink::WebView* createView(blink::WebLocalFrame* creator, const blink::WebURLRequest& request, const blink::WebWindowFeatures& features, const blink::WebString& frameName, blink::WebNavigationPolicy policy, bool suppressOpener) |
- { |
- if (!WebTestProxyBase::createView(creator, request, features, frameName, policy, suppressOpener)) |
- return 0; |
- return Base::createView(creator, request, features, frameName, policy, suppressOpener); |
- } |
- virtual void setStatusText(const blink::WebString& text) |
- { |
- WebTestProxyBase::setStatusText(text); |
- Base::setStatusText(text); |
- } |
- virtual blink::WebUserMediaClient* userMediaClient() |
- { |
- return WebTestProxyBase::userMediaClient(); |
- } |
- virtual void printPage(blink::WebLocalFrame* frame) |
- { |
- WebTestProxyBase::printPage(frame); |
- } |
- virtual blink::WebMIDIClient* webMIDIClient() |
- { |
- return WebTestProxyBase::webMIDIClient(); |
- } |
- virtual blink::WebSpeechRecognizer* speechRecognizer() |
- { |
- return WebTestProxyBase::speechRecognizer(); |
- } |
- virtual bool requestPointerLock() |
- { |
- return WebTestProxyBase::requestPointerLock(); |
- } |
- virtual void requestPointerUnlock() |
- { |
- WebTestProxyBase::requestPointerUnlock(); |
- } |
- virtual bool isPointerLocked() |
- { |
- return WebTestProxyBase::isPointerLocked(); |
- } |
- virtual void didFocus() |
- { |
- WebTestProxyBase::didFocus(); |
- Base::didFocus(); |
- } |
- virtual void didBlur() |
- { |
- WebTestProxyBase::didBlur(); |
- Base::didBlur(); |
- } |
- virtual void setToolTipText(const blink::WebString& text, blink::WebTextDirection hint) |
- { |
- WebTestProxyBase::setToolTipText(text, hint); |
- Base::setToolTipText(text, hint); |
- } |
- virtual void resetInputMethod() |
- { |
- WebTestProxyBase::resetInputMethod(); |
- } |
- virtual bool runFileChooser(const blink::WebFileChooserParams& params, blink::WebFileChooserCompletion* completion) |
- { |
- return WebTestProxyBase::runFileChooser(params, completion); |
- } |
- virtual void showValidationMessage(const blink::WebRect& anchorInRootView, const blink::WebString& mainText, const blink::WebString& supplementalText, blink::WebTextDirection hint) |
- { |
- WebTestProxyBase::showValidationMessage(anchorInRootView, mainText, supplementalText, hint); |
- } |
- virtual void hideValidationMessage() |
- { |
- WebTestProxyBase::hideValidationMessage(); |
- } |
- virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) |
- { |
- WebTestProxyBase::moveValidationMessage(anchorInRootView); |
- } |
- virtual void postSpellCheckEvent(const blink::WebString& eventName) |
- { |
- WebTestProxyBase::postSpellCheckEvent(eventName); |
- } |
- |
-private: |
- DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
+ public: |
+ explicit WebTestProxy(T t) : Base(t) {} |
+ |
+ virtual ~WebTestProxy() {} |
+ |
+ // WebViewClient implementation. |
+ virtual void didInvalidateRect(const blink::WebRect& rect) { |
+ WebTestProxyBase::DidInvalidateRect(rect); |
+ } |
+ virtual void didScrollRect(int dx, int dy, const blink::WebRect& clipRect) { |
+ WebTestProxyBase::DidScrollRect(dx, dy, clipRect); |
+ } |
+ virtual void scheduleComposite() { WebTestProxyBase::ScheduleComposite(); } |
+ virtual void scheduleAnimation() { WebTestProxyBase::ScheduleAnimation(); } |
+ virtual bool isCompositorFramePending() const { |
+ return WebTestProxyBase::IsCompositorFramePending(); |
+ } |
+ virtual void setWindowRect(const blink::WebRect& rect) { |
+ WebTestProxyBase::SetWindowRect(rect); |
+ Base::setWindowRect(rect); |
+ } |
+ virtual void show(blink::WebNavigationPolicy policy) { |
+ WebTestProxyBase::Show(policy); |
+ Base::show(policy); |
+ } |
+ virtual void didAutoResize(const blink::WebSize& newSize) { |
+ WebTestProxyBase::DidAutoResize(newSize); |
+ Base::didAutoResize(newSize); |
+ } |
+ virtual void postAccessibilityEvent(const blink::WebAXObject& object, |
+ blink::WebAXEvent event) { |
+ WebTestProxyBase::PostAccessibilityEvent(object, event); |
+ Base::postAccessibilityEvent(object, event); |
+ } |
+ virtual void startDragging(blink::WebLocalFrame* frame, |
+ const blink::WebDragData& data, |
+ blink::WebDragOperationsMask mask, |
+ const blink::WebImage& image, |
+ const blink::WebPoint& point) { |
+ WebTestProxyBase::StartDragging(frame, data, mask, image, point); |
+ // Don't forward this call to Base because we don't want to do a real |
+ // drag-and-drop. |
+ } |
+ virtual void didChangeContents() { |
+ WebTestProxyBase::DidChangeContents(); |
+ Base::didChangeContents(); |
+ } |
+ virtual blink::WebView* createView(blink::WebLocalFrame* creator, |
+ const blink::WebURLRequest& request, |
+ const blink::WebWindowFeatures& features, |
+ const blink::WebString& frameName, |
+ blink::WebNavigationPolicy policy, |
+ bool suppressOpener) { |
+ if (!WebTestProxyBase::CreateView(creator, request, features, frameName, |
+ policy, suppressOpener)) |
+ return 0; |
+ return Base::createView(creator, request, features, frameName, policy, |
+ suppressOpener); |
+ } |
+ virtual void setStatusText(const blink::WebString& text) { |
+ WebTestProxyBase::SetStatusText(text); |
+ Base::setStatusText(text); |
+ } |
+ virtual blink::WebUserMediaClient* userMediaClient() { |
+ return WebTestProxyBase::GetUserMediaClient(); |
+ } |
+ virtual void printPage(blink::WebLocalFrame* frame) { |
+ WebTestProxyBase::PrintPage(frame); |
+ } |
+ virtual blink::WebMIDIClient* webMIDIClient() { |
+ return WebTestProxyBase::GetWebMIDIClient(); |
+ } |
+ virtual blink::WebSpeechRecognizer* speechRecognizer() { |
+ return WebTestProxyBase::GetSpeechRecognizer(); |
+ } |
+ virtual bool requestPointerLock() { |
+ return WebTestProxyBase::RequestPointerLock(); |
+ } |
+ virtual void requestPointerUnlock() { |
+ WebTestProxyBase::RequestPointerUnlock(); |
+ } |
+ virtual bool isPointerLocked() { return WebTestProxyBase::IsPointerLocked(); } |
+ virtual void didFocus() { |
+ WebTestProxyBase::DidFocus(); |
+ Base::didFocus(); |
+ } |
+ virtual void didBlur() { |
+ WebTestProxyBase::DidBlur(); |
+ Base::didBlur(); |
+ } |
+ virtual void setToolTipText(const blink::WebString& text, |
+ blink::WebTextDirection hint) { |
+ WebTestProxyBase::SetToolTipText(text, hint); |
+ Base::setToolTipText(text, hint); |
+ } |
+ virtual void resetInputMethod() { WebTestProxyBase::ResetInputMethod(); } |
+ virtual bool runFileChooser(const blink::WebFileChooserParams& params, |
+ blink::WebFileChooserCompletion* completion) { |
+ return WebTestProxyBase::RunFileChooser(params, completion); |
+ } |
+ virtual void showValidationMessage(const blink::WebRect& anchorInRootView, |
+ const blink::WebString& mainText, |
+ const blink::WebString& supplementalText, |
+ blink::WebTextDirection hint) { |
+ WebTestProxyBase::ShowValidationMessage(anchorInRootView, mainText, |
+ supplementalText, hint); |
+ } |
+ virtual void hideValidationMessage() { |
+ WebTestProxyBase::HideValidationMessage(); |
+ } |
+ virtual void moveValidationMessage(const blink::WebRect& anchorInRootView) { |
+ WebTestProxyBase::MoveValidationMessage(anchorInRootView); |
+ } |
+ virtual void postSpellCheckEvent(const blink::WebString& eventName) { |
+ WebTestProxyBase::PostSpellCheckEvent(eventName); |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(WebTestProxy); |
}; |
} // namespace content |
-#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTPROXY_H_ |
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_TEST_PROXY_H_ |