Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / tests / FrameTestHelpers.cpp
index 63f5d58..e430f32 100644 (file)
  */
 
 #include "config.h"
-#include "FrameTestHelpers.h"
+#include "web/tests/FrameTestHelpers.h"
 
-#include "URLTestHelpers.h"
-#include "wtf/StdLibExtras.h"
-#include "WebFrameImpl.h"
-#include "WebSettings.h"
-#include "WebViewClient.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebThread.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/platform/WebURLResponse.h"
 #include "public/platform/WebUnitTestSupport.h"
+#include "public/web/WebSettings.h"
+#include "public/web/WebViewClient.h"
+#include "web/WebLocalFrameImpl.h"
+#include "web/tests/URLTestHelpers.h"
+#include "wtf/StdLibExtras.h"
 
 namespace blink {
 namespace FrameTestHelpers {
@@ -73,7 +73,7 @@ WebFrameClient* defaultWebFrameClient()
 
 WebViewClient* defaultWebViewClient()
 {
-    DEFINE_STATIC_LOCAL(WebViewClient,  client, ());
+    DEFINE_STATIC_LOCAL(TestWebViewClient,  client, ());
     return &client;
 }
 
@@ -122,7 +122,7 @@ WebViewImpl* WebViewHelper::initialize(bool enableJavascript, WebFrameClient* we
         m_webView->settings()->setForceCompositingMode(true);
     }
 
-    m_webView->setMainFrame(WebFrameImpl::create(webFrameClient));
+    m_webView->setMainFrame(WebLocalFrameImpl::create(webFrameClient));
 
     return m_webView;
 }
@@ -145,9 +145,9 @@ void WebViewHelper::reset()
     }
 }
 
-WebFrame* TestWebFrameClient::createChildFrame(WebFrame* parent, const WebString& frameName)
+WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, const WebString& frameName)
 {
-    WebFrame* frame = WebFrame::create(this);
+    WebFrame* frame = WebLocalFrame::create(this);
     parent->appendChild(frame);
     return frame;
 }
@@ -159,6 +159,11 @@ void TestWebFrameClient::frameDetached(WebFrame* frame)
     frame->close();
 }
 
+void TestWebViewClient::initializeLayerTreeView()
+{
+    m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLayerTreeViewForTesting(WebUnitTestSupport::TestViewTypeUnitTest));
+    ASSERT(m_layerTreeView);
+}
 
 } // namespace FrameTestHelpers
 } // namespace blink