Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / public / test / layouttest_support.h
index 6c7e847..9833988 100644 (file)
@@ -5,8 +5,11 @@
 #ifndef CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
 #define CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
 
+#include <string>
+#include <vector>
+
 #include "base/callback_forward.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientation.h"
+#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
 
 namespace blink {
 class WebDeviceMotionData;
@@ -16,13 +19,12 @@ class WebGamepads;
 struct WebSize;
 }
 
-namespace WebTestRunner {
-class WebTestProxyBase;
-}
-
 namespace content {
 
+class PageState;
+class RenderFrame;
 class RenderView;
+class WebTestProxyBase;
 
 // Turn the browser process into layout test mode.
 void EnableBrowserLayoutTestMode();
@@ -36,8 +38,8 @@ void EnableRendererLayoutTestMode();
 // Enable injecting of a WebTestProxy between WebViews and RenderViews.
 // |callback| is invoked with a pointer to WebTestProxyBase for each created
 // WebTestProxy.
-void EnableWebTestProxyCreation(const base::Callback<
-    void(RenderView*, WebTestRunner::WebTestProxyBase*)>& callback);
+void EnableWebTestProxyCreation(
+    const base::Callback<void(RenderView*, WebTestProxyBase*)>& callback);
 
 // Sets the WebGamepads that should be returned by
 // WebKitPlatformSupport::sampleGamepads().
@@ -57,9 +59,9 @@ void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data);
 // a listener through WebKitPlatformSupport::setDeviceOrientationListener().
 void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data);
 
-// Sets WebScreenOrientation that should be used when registering a listener
-// through WebKitPlatformSupport::setScreenOrientationListener().
-void SetMockScreenOrientation(const blink::WebScreenOrientation& orientation);
+// Sets WebScreenOrientationType that should be used as a mock orientation.
+void SetMockScreenOrientation(
+    const blink::WebScreenOrientationType& orientation);
 
 // Returns the length of the local session history of a render view.
 int GetLocalSessionHistoryLength(RenderView* render_view);
@@ -79,6 +81,9 @@ void ForceResizeRenderView(RenderView* render_view,
 // Set the device scale factor and force the compositor to resize.
 void SetDeviceScaleFactor(RenderView* render_view, float factor);
 
+// Set the device color profile associated with the profile |name|.
+void SetDeviceColorProfile(RenderView* render_view, const std::string& name);
+
 // Enables or disables synchronous resize mode. When enabled, all window-sizing
 // machinery is short-circuited inside the renderer. This mode is necessary for
 // some tests that were written before browsers had multi-process architecture
@@ -93,8 +98,12 @@ void EnableAutoResizeMode(RenderView* render_view,
 void DisableAutoResizeMode(RenderView* render_view,
                            const blink::WebSize& new_size);
 
-// Forces the |render_view| to use mock media streams.
-void UseMockMediaStreams(RenderView* render_view);
+// Forces the |render_frame| to use mock media streams.
+void UseMockMediaStreams(RenderFrame* render_frame);
+
+// Provides a text dump of the contents of the given page state.
+std::string DumpBackForwardList(std::vector<PageState>& page_state,
+                                size_t current_index);
 
 }  // namespace content