Title: [106028] trunk
- Revision
- 106028
- Author
- [email protected]
- Date
- 2012-01-26 12:19:05 -0800 (Thu, 26 Jan 2012)
Log Message
[Qt][WK2] fast/loader tests failed after r94178
https://bugs.webkit.org/show_bug.cgi?id=67388
Patch by Luciano Wolf <[email protected]> on 2012-01-26
Reviewed by Simon Hausmann.
Tools:
Applying the same fix used for Qt-WebKit1 from bug #67254 -
[Qt][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()
https://bugs.webkit.org/show_bug.cgi?id=67254
Translate file:///tmp/LayoutTests/* urls into the repository LayoutTests directory, which is
derived from the running location of DumpRenderTree binary.
* WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
(WTR::LayoutTestController::pathToLocalResource):
LayoutTests:
Removing the following tests from skipped list:
fast/loader/local-CSS-from-local.html
fast/loader/local-_javascript_-from-local.html
fast/loader/local-image-from-local.html
* platform/qt-wk2/Skipped:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (106027 => 106028)
--- trunk/LayoutTests/ChangeLog 2012-01-26 20:15:50 UTC (rev 106027)
+++ trunk/LayoutTests/ChangeLog 2012-01-26 20:19:05 UTC (rev 106028)
@@ -1,3 +1,17 @@
+2012-01-26 Luciano Wolf <[email protected]>
+
+ [Qt][WK2] fast/loader tests failed after r94178
+ https://bugs.webkit.org/show_bug.cgi?id=67388
+
+ Reviewed by Simon Hausmann.
+
+ Removing the following tests from skipped list:
+ fast/loader/local-CSS-from-local.html
+ fast/loader/local-_javascript_-from-local.html
+ fast/loader/local-image-from-local.html
+
+ * platform/qt-wk2/Skipped:
+
2012-01-26 Jesus Sanchez-Palencia <[email protected]>
Updating skipped tests after r105997.
Modified: trunk/LayoutTests/platform/qt-wk2/Skipped (106027 => 106028)
--- trunk/LayoutTests/platform/qt-wk2/Skipped 2012-01-26 20:15:50 UTC (rev 106027)
+++ trunk/LayoutTests/platform/qt-wk2/Skipped 2012-01-26 20:19:05 UTC (rev 106028)
@@ -250,12 +250,6 @@
# new failing tests
fast/events/mouseover-button.html
-# Tests failed after r94178
-# https://bugs.webkit.org/show_bug.cgi?id=67388
-fast/loader/local-CSS-from-local.html
-fast/loader/local-_javascript_-from-local.html
-fast/loader/local-image-from-local.html
-
# Missing layoutTestController.dumpResourceResponseMIMETypes()
# https://bugs.webkit.org/show_bug.cgi?id=67392
fast/preloader/document-write-noscript.html
Modified: trunk/Tools/ChangeLog (106027 => 106028)
--- trunk/Tools/ChangeLog 2012-01-26 20:15:50 UTC (rev 106027)
+++ trunk/Tools/ChangeLog 2012-01-26 20:19:05 UTC (rev 106028)
@@ -1,3 +1,19 @@
+2012-01-26 Luciano Wolf <[email protected]>
+
+ [Qt][WK2] fast/loader tests failed after r94178
+ https://bugs.webkit.org/show_bug.cgi?id=67388
+
+ Reviewed by Simon Hausmann.
+
+ Applying the same fix used for Qt-WebKit1 from bug #67254 -
+ [Qt][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()
+ https://bugs.webkit.org/show_bug.cgi?id=67254
+ Translate file:///tmp/LayoutTests/* urls into the repository LayoutTests directory, which is
+ derived from the running location of DumpRenderTree binary.
+
+ * WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
+ (WTR::LayoutTestController::pathToLocalResource):
+
2012-01-26 Caio Marcelo de Oliveira Filho <[email protected]>
Implement overridePreference for boolean preferences in WebKitTestRunner
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp (106027 => 106028)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp 2012-01-26 20:15:50 UTC (rev 106027)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp 2012-01-26 20:19:05 UTC (rev 106028)
@@ -29,6 +29,7 @@
#include "ActivateFonts.h"
#include "InjectedBundle.h"
+#include <QCoreApplication>
#include <QDir>
#include <QFontDatabase>
#include <QObject>
@@ -88,8 +89,21 @@
JSRetainPtr<JSStringRef> LayoutTestController::pathToLocalResource(JSStringRef url)
{
- QString path = QDir::toNativeSeparators(QString(reinterpret_cast<const QChar*>(JSStringGetCharactersPtr(url)), JSStringGetLength(url)));
- return JSStringCreateWithCharacters(reinterpret_cast<const JSChar*>(path.constData()), path.length());
+ QString localTmpUrl(QStringLiteral("file:///tmp/LayoutTests"));
+ QString givenUrl(reinterpret_cast<const QChar*>(JSStringGetCharactersPtr(url)), JSStringGetLength(url));
+
+ // Translate a request for /tmp/LayoutTests to the repository LayoutTests directory.
+ // Do not rely on a symlink to be created via the test runner, which will not work on Windows.
+ if (givenUrl.startsWith(localTmpUrl)) {
+ // DumpRenderTree lives in WebKit/WebKitBuild/<build_mode>/bin.
+ // Translate from WebKit/WebKitBuild/Release/bin => WebKit/LayoutTests.
+ QFileInfo layoutTestsRoot(QCoreApplication::applicationDirPath() + QStringLiteral("/../../../LayoutTests/"));
+ if (layoutTestsRoot.exists()) {
+ QString path = QStringLiteral("file://") + layoutTestsRoot.absolutePath() + givenUrl.mid(localTmpUrl.length());
+ return JSStringCreateWithCharacters(reinterpret_cast<const JSChar*>(path.constData()), path.length());
+ }
+ }
+ return url;
}
JSRetainPtr<JSStringRef> LayoutTestController::platformName()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes