summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/chromium/TestShell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/DumpRenderTree/chromium/TestShell.cpp')
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index 2bccb6a32..75fec130a 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -47,6 +47,7 @@
#include "WebRuntimeFeatures.h"
#include "WebScriptController.h"
#include "WebSettings.h"
+#include "WebTestProxy.h"
#include "WebView.h"
#include "WebViewHost.h"
#include "platform/WebArrayBufferView.h"
@@ -117,6 +118,8 @@ TestShell::TestShell()
, m_accelerated2dCanvasEnabled(false)
, m_deferred2dCanvasEnabled(false)
, m_acceleratedPaintingEnabled(false)
+ , m_perTilePaintingEnabled(false)
+ , m_acceleratedAnimationEnabled(false)
, m_deferredImageDecodingEnabled(false)
, m_stressOpt(false)
, m_stressDeopt(false)
@@ -126,7 +129,6 @@ TestShell::TestShell()
WebRuntimeFeatures::enableDataTransferItems(true);
WebRuntimeFeatures::enableDeviceMotion(false);
WebRuntimeFeatures::enableGeolocation(true);
- WebRuntimeFeatures::enablePointerLock(true);
WebRuntimeFeatures::enableIndexedDatabase(true);
WebRuntimeFeatures::enableInputTypeDateTime(true);
WebRuntimeFeatures::enableInputTypeDateTimeLocal(true);
@@ -139,7 +141,6 @@ TestShell::TestShell()
WebRuntimeFeatures::enableEncryptedMedia(true);
WebRuntimeFeatures::enableMediaStream(true);
WebRuntimeFeatures::enablePeerConnection(true);
- WebRuntimeFeatures::enableDeprecatedPeerConnection(true);
WebRuntimeFeatures::enableWebAudio(true);
WebRuntimeFeatures::enableVideoTrack(true);
WebRuntimeFeatures::enableGamepad(true);
@@ -183,6 +184,8 @@ void TestShell::createMainWindow()
m_webView = m_webViewHost->webView();
m_testInterfaces->setDelegate(m_webViewHost.get());
m_testInterfaces->setWebView(m_webView);
+ m_testRunner->setDelegate(m_webViewHost.get());
+ m_testRunner->setWebView(m_webView);
m_drtDevToolsAgent->setWebView(m_webView);
}
@@ -190,6 +193,8 @@ TestShell::~TestShell()
{
m_testInterfaces->setDelegate(0);
m_testInterfaces->setWebView(0);
+ m_testRunner->setDelegate(0);
+ m_testRunner->setWebView(0);
m_drtDevToolsAgent->setWebView(0);
}
@@ -236,6 +241,8 @@ void TestShell::resetWebSettings(WebView& webView)
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
m_prefs.deferred2dCanvasEnabled = m_deferred2dCanvasEnabled;
m_prefs.acceleratedPaintingEnabled = m_acceleratedPaintingEnabled;
+ m_prefs.perTilePaintingEnabled = m_perTilePaintingEnabled;
+ m_prefs.acceleratedAnimationEnabled = m_acceleratedAnimationEnabled;
m_prefs.deferredImageDecodingEnabled = m_deferredImageDecodingEnabled;
m_prefs.applyTo(&webView);
}
@@ -388,16 +395,6 @@ void TestShell::testTimedOut()
testFinished();
}
-void TestShell::setPerTilePaintingEnabled(bool enabled)
-{
- Platform::current()->compositorSupport()->setPerTilePaintingEnabled(enabled);
-}
-
-void TestShell::setAcceleratedAnimationEnabled(bool enabled)
-{
- Platform::current()->compositorSupport()->setAcceleratedAnimationEnabled(enabled);
-}
-
static string dumpDocumentText(WebFrame* frame)
{
// We use the document element's text instead of the body text here because
@@ -751,7 +748,13 @@ WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent)
{
- WebViewHost* host = new WebViewHost(this);
+ WebTestRunner::WebTestProxy<WebViewHost, TestShell*>* host = new WebTestRunner::WebTestProxy<WebViewHost, TestShell*>(this);
+ host->setInterfaces(m_testInterfaces.get());
+ if (m_webViewHost)
+ host->setDelegate(m_webViewHost.get());
+ else
+ host->setDelegate(host);
+ host->setProxy(host);
WebView* view = WebView::create(host);
view->setPermissionClient(webPermissions());
view->setDevToolsAgentClient(devToolsAgent);