Title: [100603] trunk/Source/WebKit2
- Revision
- 100603
- Author
- [email protected]
- Date
- 2011-11-17 04:28:16 -0800 (Thu, 17 Nov 2011)
Log Message
[Qt] Resolve import and web-process paths automatically for QML tests
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
(main):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (100602 => 100603)
--- trunk/Source/WebKit2/ChangeLog 2011-11-17 12:27:55 UTC (rev 100602)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-17 12:28:16 UTC (rev 100603)
@@ -1,5 +1,15 @@
2011-11-17 Tor Arne Vestbø <[email protected]>
+ [Qt] Resolve import and web-process paths automatically for QML tests
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * UIProcess/API/qt/tests/qmltests/qmltests.pro:
+ * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
+ (main):
+
+2011-11-17 Tor Arne Vestbø <[email protected]>
+
[Qt] Move WebKit2 C++ APIs to private API and build QML extension plugin on top of that
A new extension object has been added to QQuickWebView (the same approach should be used
Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro (100602 => 100603)
--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro 2011-11-17 12:27:55 UTC (rev 100602)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro 2011-11-17 12:28:16 UTC (rev 100603)
@@ -13,6 +13,7 @@
# QML files tested are the ones in WebKit source repository.
DEFINES += QUICK_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
+DEFINES += IMPORT_DIR=\"\\\"$${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP}imports\\\"\"
OTHER_FILES += \
WebView/tst_properties.qml \
Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp (100602 => 100603)
--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp 2011-11-17 12:27:55 UTC (rev 100602)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp 2011-11-17 12:28:16 UTC (rev 100603)
@@ -23,6 +23,7 @@
#include "qquickwebpage_p.h"
#include "qquickwebview_p.h"
+#include <QVarLengthArray>
#include <QtQuickTest/quicktest.h>
#include <QtWidgets/QApplication>
@@ -37,7 +38,19 @@
int main(int argc, char** argv)
{
+ QVarLengthArray<char*, 8> arguments;
+ for (int i = 0; i < argc; ++i)
+ arguments.append(argv[i]);
+
+ arguments.append(const_cast<char*>("-import"));
+ arguments.append(const_cast<char*>(IMPORT_DIR));
+
+ argc = arguments.count();
+ argv = arguments.data();
+
suppressDebugOutput();
+ addQtWebProcessToPath();
+
// Instantiate QApplication to prevent quick_test_main to instantiate a QGuiApplication.
// This can be removed as soon as we do not use QtWidgets any more.
QApplication app(argc, argv);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes