X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fshell%2Frenderer%2Ftest_runner%2FWebTestDelegate.h;h=f63e31b7e91997cb6ac2a50d2ab546550b38896e;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=857466491db097bb50f16d1be033b7562f797886;hpb=d482483c7e386df3f789b1cb1845b73bfcaae2bd;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/shell/renderer/test_runner/WebTestDelegate.h b/src/content/shell/renderer/test_runner/WebTestDelegate.h index 8574664..f63e31b 100644 --- a/src/content/shell/renderer/test_runner/WebTestDelegate.h +++ b/src/content/shell/renderer/test_runner/WebTestDelegate.h @@ -7,6 +7,7 @@ #include +#include "third_party/WebKit/public/platform/WebScreenOrientationType.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebVector.h" @@ -17,6 +18,7 @@ namespace blink { class WebDeviceMotionData; class WebDeviceOrientationData; class WebFrame; +class WebGamepad; class WebGamepads; class WebHistoryItem; struct WebRect; @@ -24,11 +26,11 @@ struct WebSize; struct WebURLError; } -namespace WebTestRunner { +namespace content { -struct WebPreferences; class WebTask; class WebTestProxyBase; +struct TestPreferences; class WebTestDelegate { public: @@ -40,11 +42,20 @@ public: // Set the gamepads to return from Platform::sampleGamepads(). virtual void setGamepadData(const blink::WebGamepads&) = 0; + // Notifies blink about a new gamepad. + virtual void didConnectGamepad(int index, const blink::WebGamepad&) = 0; + + // Notifies blink that a gamepad has been disconnected. + virtual void didDisconnectGamepad(int index, const blink::WebGamepad&) = 0; + // Set data to return when registering via Platform::setDeviceMotionListener(). virtual void setDeviceMotionData(const blink::WebDeviceMotionData&) = 0; // Set data to return when registering via Platform::setDeviceOrientationListener(). virtual void setDeviceOrientationData(const blink::WebDeviceOrientationData&) = 0; + // Set orientation to set when registering via Platform::setScreenOrientationListener(). + virtual void setScreenOrientation(const blink::WebScreenOrientationType&) = 0; + // Add a message to the text dump for the layout test. virtual void printMessage(const std::string& message) = 0; @@ -71,7 +82,7 @@ public: virtual blink::WebURL rewriteLayoutTestsURL(const std::string& utf8URL) = 0; // Manages the settings to used for layout tests. - virtual WebPreferences* preferences() = 0; + virtual TestPreferences* preferences() = 0; virtual void applyPreferences() = 0; // Enables or disables synchronous resize mode. When enabled, all window-sizing machinery is @@ -89,7 +100,8 @@ public: virtual void clearDevToolsLocalStorage() = 0; // Opens and closes the inspector. - virtual void showDevTools() = 0; + virtual void showDevTools(const std::string& settings, + const std::string& frontend_url) = 0; virtual void closeDevTools() = 0; // Evaluate the given script in the DevTools agent. @@ -102,6 +114,9 @@ public: // Controls the device scale factor of the main WebView for hidpi tests. virtual void setDeviceScaleFactor(float) = 0; + // Change the device color profile while running a layout test. + virtual void setDeviceColorProfile(const std::string& name) = 0; + // Controls which WebView should be focused. virtual void setFocus(WebTestProxyBase*, bool) = 0; @@ -135,11 +150,11 @@ public: // Returns true if resource requests to external URLs should be permitted. virtual bool allowExternalPages() = 0; - // Returns the back/forward history for the WebView associated with the - // given WebTestProxyBase as well as the index of the current entry. - virtual void captureHistoryForWindow(WebTestProxyBase*, blink::WebVector*, size_t* currentEntryIndex) = 0; + // Returns a text dump the back/forward history for the WebView associated + // with the given WebTestProxyBase. + virtual std::string dumpHistoryForWindow(WebTestProxyBase*) = 0; }; -} +} // namespace content #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_