summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/DumpRenderTree/chromium')
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h1
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp40
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.h4
-rw-r--r--WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp11
-rw-r--r--WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp13
-rw-r--r--WebKitTools/DumpRenderTree/chromium/TestShell.cpp2
7 files changed, 59 insertions, 17 deletions
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
index b05fe21..4736676 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
@@ -84,11 +84,6 @@ WebCString DRTDevToolsAgent::injectedScriptSource()
return webkit_support::GetDevToolsInjectedScriptSource();
}
-WebCString DRTDevToolsAgent::injectedScriptDispatcherSource()
-{
- return webkit_support::GetDevToolsInjectedScriptDispatcherSource();
-}
-
WebCString DRTDevToolsAgent::debuggerScriptSource()
{
return webkit_support::GetDevToolsDebuggerScriptSource();
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
index df52866..899a23f 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
@@ -62,7 +62,6 @@ public:
virtual void forceRepaint();
virtual void runtimeFeatureStateChanged(const WebKit::WebString& feature, bool enabled);
virtual WebKit::WebCString injectedScriptSource();
- virtual WebKit::WebCString injectedScriptDispatcherSource();
virtual WebKit::WebCString debuggerScriptSource();
void asyncCall(const DRTDevToolsCallArgs&);
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index e82a65e..beae21e 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -117,6 +117,8 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("pauseTransitionAtTimeOnElementWithId", &LayoutTestController::pauseTransitionAtTimeOnElementWithId);
bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations);
+ bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
+ bindMethod("resumeAnimations", &LayoutTestController::resumeAnimations);
bindMethod("disableImageLoading", &LayoutTestController::disableImageLoading);
bindMethod("setIconDatabaseEnabled", &LayoutTestController::setIconDatabaseEnabled);
bindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
@@ -838,6 +840,32 @@ int LayoutTestController::numberOfActiveAnimations()
return controller->numberOfActiveAnimations();
}
+void LayoutTestController::suspendAnimations()
+{
+ WebFrame* webFrame = m_shell->webView()->mainFrame();
+ if (!webFrame)
+ return;
+
+ WebAnimationController* controller = webFrame->animationController();
+ if (!controller)
+ return;
+
+ controller->suspendAnimations();
+}
+
+void LayoutTestController::resumeAnimations()
+{
+ WebFrame* webFrame = m_shell->webView()->mainFrame();
+ if (!webFrame)
+ return;
+
+ WebAnimationController* controller = webFrame->animationController();
+ if (!controller)
+ return;
+
+ controller->resumeAnimations();
+}
+
void LayoutTestController::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
{
result->set(false);
@@ -875,6 +903,18 @@ void LayoutTestController::numberOfActiveAnimations(const CppArgumentList&, CppV
result->set(numberOfActiveAnimations());
}
+void LayoutTestController::suspendAnimations(const CppArgumentList&, CppVariant* result)
+{
+ suspendAnimations();
+ result->setNull();
+}
+
+void LayoutTestController::resumeAnimations(const CppArgumentList&, CppVariant* result)
+{
+ resumeAnimations();
+ result->setNull();
+}
+
void LayoutTestController::disableImageLoading(const CppArgumentList&, CppVariant* result)
{
m_shell->webView()->settings()->setLoadsImagesAutomatically(false);
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index fb91544..352e89f 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -207,6 +207,8 @@ public:
void pauseTransitionAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
void numberOfActiveAnimations(const CppArgumentList&, CppVariant*);
+ void suspendAnimations(const CppArgumentList&, CppVariant*);
+ void resumeAnimations(const CppArgumentList&, CppVariant*);
void disableImageLoading(const CppArgumentList&, CppVariant*);
@@ -395,6 +397,8 @@ private:
bool pauseTransitionAtTimeOnElementWithId(const WebKit::WebString& propertyName, double time, const WebKit::WebString& elementId);
bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&);
int numberOfActiveAnimations();
+ void suspendAnimations();
+ void resumeAnimations();
// Used for test timeouts.
ScopedRunnableMethodFactory<LayoutTestController> m_timeoutFactory;
diff --git a/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp b/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp
index fe70cab..0bf3802 100644
--- a/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp
@@ -31,11 +31,12 @@
#include "config.h"
#include "MockSpellCheck.h"
-#include "public/WebString.h"
#include <wtf/ASCIICType.h>
#include <wtf/Assertions.h>
+#include <wtf/text/WTFString.h>
+
+#include "public/WebString.h"
-using namespace WebCore;
using namespace WebKit;
MockSpellCheck::MockSpellCheck()
@@ -59,7 +60,7 @@ bool MockSpellCheck::spellCheckWord(const WebString& text, int* misspelledOffset
// Convert to a String because we store String instances in
// m_misspelledWords and WebString has no find().
- const String stringText(text.data(), text.length());
+ const WTF::String stringText(text.data(), text.length());
// Extract the first possible English word from the given string.
// The given string may include non-ASCII characters or numbers. So, we
@@ -82,7 +83,7 @@ bool MockSpellCheck::spellCheckWord(const WebString& text, int* misspelledOffset
// extracted word if this word is a known misspelled word.
// (See the comment in MockSpellCheck::initializeIfNeeded() why we use a
// misspelled-word table.)
- String word = stringText.substring(wordOffset, wordLength);
+ WTF::String word = stringText.substring(wordOffset, wordLength);
if (!m_misspelledWords.contains(word))
return true;
@@ -137,7 +138,7 @@ bool MockSpellCheck::initializeIfNeeded()
m_misspelledWords.clear();
for (size_t i = 0; i < arraysize(misspelledWords); ++i)
- m_misspelledWords.add(String::fromUTF8(misspelledWords[i]), false);
+ m_misspelledWords.add(WTF::String::fromUTF8(misspelledWords[i]), false);
// Mark as initialized to prevent this object from being initialized twice
// or more.
diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
index 86903be..95353a7 100644
--- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
@@ -31,36 +31,37 @@
#include "config.h"
#include "NotificationPresenter.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
#include "googleurl/src/gurl.h"
#include "public/WebNotification.h"
#include "public/WebNotificationPermissionCallback.h"
#include "public/WebSecurityOrigin.h"
#include "public/WebString.h"
#include "public/WebURL.h"
-#include <wtf/text/CString.h>
-using namespace WebCore;
using namespace WebKit;
void NotificationPresenter::grantPermission(const WebString& origin)
{
// Make sure it's in the form of an origin.
GURL url(origin);
- m_allowedOrigins.add(String(url.GetOrigin().spec().c_str()));
+ m_allowedOrigins.add(WTF::String(url.GetOrigin().spec().c_str()));
}
// The output from all these methods matches what DumpRenderTree produces.
bool NotificationPresenter::show(const WebNotification& notification)
{
if (!notification.replaceId().isEmpty()) {
- String replaceId(notification.replaceId().data(), notification.replaceId().length());
+ WTF::String replaceId(notification.replaceId().data(), notification.replaceId().length());
if (m_replacements.find(replaceId) != m_replacements.end())
printf("REPLACING NOTIFICATION %s\n",
m_replacements.find(replaceId)->second.utf8().data());
WebString identifier = notification.isHTML() ?
notification.url().spec().utf16() : notification.title();
- m_replacements.set(replaceId, String(identifier.data(), identifier.length()));
+ m_replacements.set(replaceId, WTF::String(identifier.data(), identifier.length()));
}
if (notification.isHTML()) {
@@ -103,7 +104,7 @@ void NotificationPresenter::objectDestroyed(const WebKit::WebNotification& notif
WebNotificationPresenter::Permission NotificationPresenter::checkPermission(const WebURL& url)
{
// Check with the layout test controller
- String origin = String(static_cast<GURL>(url).GetOrigin().spec().c_str());
+ WTF::String origin = WTF::String(static_cast<GURL>(url).GetOrigin().spec().c_str());
bool allowed = m_allowedOrigins.find(origin) != m_allowedOrigins.end();
return allowed ? WebNotificationPresenter::PermissionAllowed
: WebNotificationPresenter::PermissionDenied;
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
index 64c20b0..7ea36e1 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
@@ -225,6 +225,8 @@ void TestShell::resetWebSettings(WebView& webView)
#else
settings->setEditingBehavior(WebSettings::EditingBehaviorWin);
#endif
+ // FIXME: crbug.com/51879
+ settings->setAcceleratedCompositingEnabled(false);
}
void TestShell::runFileTest(const TestParams& params)