Changeset 94676 in webkit
- Timestamp:
- Sep 7, 2011 10:04:22 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r94667 r94676 1 2011-09-07 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource() 4 https://bugs.webkit.org/show_bug.cgi?id=67254 5 6 Reviewed by Csaba Osztrogonác. 7 8 Translate file:///tmp/LayoutTests/* urls into the repository LayoutTests directory, which is 9 derived from the running location of DumpRenderTree binary. 10 11 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 12 (LayoutTestController::pathToLocalResource): 13 (LayoutTestController::setUserStyleSheetLocation): pass the url through pathToLocalResource 14 1 15 2011-09-07 Csaba Osztrogonác <ossy@webkit.org> 2 16 -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r94343 r94676 34 34 #include "WorkQueue.h" 35 35 #include "WorkQueueItemQt.h" 36 #include <QCoreApplication> 36 37 #include <QDir> 37 38 #include <QLocale> … … 242 243 QString LayoutTestController::pathToLocalResource(const QString& url) 243 244 { 244 // Function introduced in r28690. 245 return QDir::toNativeSeparators(url); 245 QString localTmpUrl(QLatin1String("file:///tmp/LayoutTests")); 246 247 // Translate a request for /tmp/LayoutTests to the repository LayoutTests directory. 248 // Do not rely on a symlink to be created via the test runner, which will not work on Windows. 249 if (url.startsWith(localTmpUrl)) { 250 // DumpRenderTree lives in WebKit/WebKitBuild/<build_mode>/bin. 251 // Translate from WebKit/WebKitBuild/Release/bin => WebKit/LayoutTests. 252 QFileInfo layoutTestsRoot(QCoreApplication::applicationDirPath() + QLatin1String("/../../../LayoutTests/")); 253 if (layoutTestsRoot.exists()) 254 return QLatin1String("file://") + layoutTestsRoot.absolutePath() + url.mid(localTmpUrl.length()); 255 } 256 257 return url; 246 258 } 247 259 … … 688 700 void LayoutTestController::setUserStyleSheetLocation(const QString& url) 689 701 { 690 m_userStyleSheetLocation = QUrl::fromEncoded(url.toAscii(), QUrl::StrictMode); 702 QByteArray urlData = pathToLocalResource(url).toLatin1(); 703 m_userStyleSheetLocation = QUrl::fromEncoded(urlData, QUrl::StrictMode); 691 704 692 705 if (m_userStyleSheetEnabled)
Note: See TracChangeset
for help on using the changeset viewer.