Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / public / test / render_view_test.h
index 87ae5b9..5af0f6e 100644 (file)
@@ -19,7 +19,6 @@
 #include "third_party/WebKit/public/web/WebFrame.h"
 
 namespace blink {
-class WebHistoryItem;
 class WebWidget;
 }
 
@@ -32,6 +31,7 @@ class ContentBrowserClient;
 class ContentClient;
 class ContentRendererClient;
 class MockRenderProcess;
+class PageState;
 class RendererMainPlatformDelegate;
 class RendererWebKitPlatformSupportImplNoSandboxImpl;
 class RenderView;
@@ -59,7 +59,7 @@ class RenderViewTest : public testing::Test {
   void ProcessPendingMessages();
 
   // Returns a pointer to the main frame.
-  blink::WebFrame* GetMainFrame();
+  blink::WebLocalFrame* GetMainFrame();
 
   // Executes the given JavaScript in the context of the main frame. The input
   // is a NULL-terminated UTF-8 string.
@@ -77,10 +77,13 @@ class RenderViewTest : public testing::Test {
   void LoadHTML(const char* html);
 
   // Navigates the main frame back or forward in session history and commits.
-  // The caller must capture a WebHistoryItem for the target page. This is
-  // available from the WebFrame.
-  void GoBack(const blink::WebHistoryItem& item);
-  void GoForward(const blink::WebHistoryItem& item);
+  // The caller must capture a PageState for the target page.
+  void GoBack(const PageState& state);
+  void GoForward(const PageState& state);
+
+  // Navigates the main frame back to whatever is considered the previous
+  // history entry internally.
+  void GoBackToPrevious();
 
   // Sends one native key event over IPC.
   void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event);
@@ -119,7 +122,8 @@ class RenderViewTest : public testing::Test {
 
   // These are all methods from RenderViewImpl that we expose to testing code.
   bool OnMessageReceived(const IPC::Message& msg);
-  void DidNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation);
+  void DidNavigateWithinPage(blink::WebLocalFrame* frame,
+                             bool is_new_navigation);
   void SendContentStateImmediately();
   blink::WebWidget* GetWebWidget();
 
@@ -154,7 +158,7 @@ class RenderViewTest : public testing::Test {
 #endif
 
  private:
-  void GoToOffset(int offset, const blink::WebHistoryItem& history_item);
+  void GoToOffset(int offset, const PageState& state);
 };
 
 }  // namespace content