[Qt][WK2] Canvas tests make css2.1 ones failing
authorzherczeg@webkit.org <zherczeg@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 08:47:45 +0000 (08:47 +0000)
committerzherczeg@webkit.org <zherczeg@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2011 08:47:45 +0000 (08:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=53427

Patch by Zoltan Herczeg <zherczeg@inf.u-szeged.hu> on 2011-06-09
Reviewed by Csaba Osztrogonac.

Tools:

Adding a workaround for this issue by mimicing the behaviour of DumpRenderTree.
Since the Qt port should eventually go to QRawFont, this issue will be resolved
in the future. Both clearMemoryCaches() and removeAllApplicationFonts() are
needed for the workaround.

* WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
(WTR::LayoutTestController::platformInitialize):

LayoutTests:

Unskipping canvas tests for WebKit2-Qt.

* platform/qt-wk2/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/qt-wk2/Skipped
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp

index 9a901bb..8cc7a23 100644 (file)
@@ -1,3 +1,14 @@
+2011-06-09  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
+
+        Reviewed by Csaba Osztrogonac.
+
+        [Qt][WK2] Canvas tests make css2.1 ones failing
+        https://bugs.webkit.org/show_bug.cgi?id=53427
+
+        Unskipping canvas tests for WebKit2-Qt.
+
+        * platform/qt-wk2/Skipped:
+
 2011-06-09  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index a0c38f9..e36df3c 100644 (file)
@@ -2270,9 +2270,6 @@ http/tests/history/popstate-fires-with-pending-requests.html
 # requires video.buffered to be able to return multiple timeranges
 http/tests/media/video-buffered.html
 
-# canvas tests pass, but break ~100 css2.1 tests, it might be a bug in WebKitTestRunner
-canvas
-
 # These tests always fail (with and without --singly). It needs investigation.
 animations/animation-controller-drt-api.html
 dom/xhtml/level2/html/HTMLDocument17.xhtml
index a00ec18..8489a25 100644 (file)
@@ -1,3 +1,18 @@
+2011-06-09  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
+
+        Reviewed by Csaba Osztrogonac.
+
+        [Qt][WK2] Canvas tests make css2.1 ones failing
+        https://bugs.webkit.org/show_bug.cgi?id=53427
+
+        Adding a workaround for this issue by mimicing the behaviour of DumpRenderTree.
+        Since the Qt port should eventually go to QRawFont, this issue will be resolved
+        in the future. Both clearMemoryCaches() and removeAllApplicationFonts() are
+        needed for the workaround.
+
+        * WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
+        (WTR::LayoutTestController::platformInitialize):
+
 2011-06-09  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Chris Fleizach.
index 72902e1..73c295e 100644 (file)
 #include "config.h"
 #include "LayoutTestController.h"
 
+#include "ActivateFonts.h"
 #include "InjectedBundle.h"
 #include <QDir>
+#include <QFontDatabase>
 #include <QObject>
+#include <qwebsettings.h>
 
 namespace WTR {
 
@@ -55,6 +58,15 @@ private:
 
 void LayoutTestController::platformInitialize()
 {
+    // Make WebKit2 mimic the behaviour of DumpRenderTree, which is incorrect,
+    // but tests are successfully passed. On the long run, Qt will move to QRawFont,
+    // which makes the use of QFontDatabase unnecessary.
+    // See https://bugs.webkit.org/show_bug.cgi?id=53427
+    QWebSettings::clearMemoryCaches();
+#if !(defined(Q_OS_SYMBIAN) && QT_VERSION <= QT_VERSION_CHECK(4, 6, 2))
+    QFontDatabase::removeAllApplicationFonts();
+#endif
+    activateFonts();
     QObject::connect(&m_waitToDumpWatchdogTimer, SIGNAL(timeout()), WatchdogTimerHelper::instance(), SLOT(timerFired()));
 }