aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
Commit message (Collapse)AuthorAgeFilesLines
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-063-0/+33
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Indicate that QuickTestLib is runningLaszlo Agocs2015-09-091-0/+2
| | | | | | | | | QTestLib already sets this environment variable to indicate that the code is running on a test environment. Do the same for QuickTest too. Change-Id: I597237fcd16dc568b750bdef325881e808c407eb Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Change TestEvent key default event routing behaviorFilippo Cucchetto2015-08-162-6/+14
| | | | | | | | | | | | | | | The current behavior of the TestEvent is to send all the key events to the test window. For this reason is not possible routing events to custom windows created inside the test suite. The new behavior is to send the key events to the current focused window [Change][QuickTest][TestCase] Changed default routing behavior for key events in TestCase. The key events are sent to the window with active focus Change-Id: I6ff3113eb9f1cbc25f6cfd2dd7bfdff178ee6ac3 Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Send the mouse events to the correct windowAlbert Astals Cid2015-08-032-12/+16
| | | | | | | | | | That is the window with the item, not the window that contains the TestUtil Item Change-Id: I13f5bfd0556e594843d499d014e92bcc41850f45 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-1/+1
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QuickTest: Enable use of BLACKLIST fileCaroline Chao2015-06-153-2/+20
| | | | | | | | So qml test functions can be blacklisted. Qml test functions have the following format: TestCaseName::functionName. Change-Id: Ifcaa8d77d8f0956472aa568dc6dbfcbdde4e5063 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Get rid of asFunctionObject()Lars Knoll2015-04-211-1/+1
| | | | | Change-Id: Ib4858376dc0ec57fa473c80696abc66a570c90ec Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* TestCase: add equals() function to QuickTestImageObject.Mitch Curtis2015-04-211-0/+8
| | | | | | | | | | | | | | | | | | This allows for comparison of image objects returned from TestCase's grabImage() function using QImage's operator== function. Doing pixel by pixel image comparisons in QML is extremely slow. This functionality is useful for checking that an item was redrawn after a property change, for example. [ChangeLog][QuickTest][TestCase] Added equals() function to image object returned from TestCase's grabImage() function. Change-Id: I0ece9df6effe2b1b9d8e1ee8ac011115d9367ef2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Further cleanupsLars Knoll2015-04-161-2/+2
| | | | | | | | | The get and getIndexed vtable methods should take a const Managed pointer. Start cleaning up the asFoo() methods in Value and Managed by removing asArrayObject() and asErrorObject(). Change-Id: Ibd49bf20773ef84c15785b7ac37a7bc9fd4745d5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-6/+16
|\ | | | | | | Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
| * Improved QML test robustness and logging.Jason Erb2015-03-301-6/+16
| | | | | | | | | | | | | | | | Added logging to quick_test_main and reordered for robustness (e.g. moved "wait for load" to before error check). Change-Id: Ifd48b5bdd1efee4301e5c4e571241762dca176ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | qmltest: Make sure we inherit all of testlib's MODULE_CONFIGTor Arne Vestbø2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We don't know what's in testlib's MODULE_CONFIG, so we can't hard-code the value. E.g., with the introduction of XCTest support in testlib [1], we'll gain an additional member in testlib's module config set for taking care of the XCTest framework include path, and this value also needs to be propagated/inherited to the final target. [1] https://codereview.qt-project.org/#/c/107477/ Change-Id: I28ee44ac41f148a873ab35adcae38e73bef3316f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | testlib: Introduce MouseDoubleClickSequence() methodCaroline Chao2015-03-022-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing method MouseDoubleClick() emulates the mouse double click event only. The added method MouseDoubleClickSequence() emulates the full sequence of mouse events a physical double-click would generate: Press-Release-Press-DoubleClick-Release Introducing a new method in order to provide convenience when a test requires to simulate a complete double-click action without changing the behavior of MouseDoubleClick() and risking to break existing tests. Add autotest. Task-number: QTBUG-42185 Change-Id: I1cdddd9e21d3b1d8a818f6d4e3717b06b7d70e08 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-0/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * qquicktest: Wait for the view to finish loadingDaiwei Li2015-02-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | Tests can be skipped if the view is still loading by the time we get to the end of the loop. There is a case where the window is active but the QML hasn't been loaded. Change-Id: I4e8346ee547653810458d042925d673748c1fec8 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QuickTestResult: Try a bit harder when stringifying a valueGabriel de Dietrich2015-02-121-1/+3
| | | | | | | | | | | | | | | | | | | | Q_GADGETs are not always QVariant::toString()-convertible but they probably have their own toString() function that we always try to call. This may still lead to false posi- tives, but in a much smaller proportion. Change-Id: I80547a9e773e97410fe5d4723efcac6b010046f9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-128-56/+56
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Cleanup variant conversion codeLars Knoll2015-01-091-1/+1
| | | | | | | | | | | | | | | | Make public methods proper members of the ExecutionEngine, and move private methods into the .cpp file only. Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move the variant conversion methods from qv8engine to qv4::ExecutionEngineLars Knoll2015-01-091-1/+1
| | | | | | | | | | Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of QV8Engine::toStringLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: Ib51fa09ae251c1b7b8878ecdf920016f8fcc0067 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine dependency in toVariant conversionsLars Knoll2015-01-021-3/+2
| | | | | | | | | | Change-Id: I0f2f77c9cc268a0c5ca3ffe0cd66fc98bb1964b3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Add -plugins argument to qmltestrunner to specify plugins search pathAlain Martin2014-12-171-0/+7
|/ | | | | | | Allow users to specify locations of compiled QML plugins. Change-Id: I66059dc7b1314ca6fbef87032b16ccf3caf8bd30 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-051-1/+1
| | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-258-152/+88
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-07-261-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/jsruntime/qv4arrayobject.cpp src/qml/jsruntime/qv4engine.cpp Change-Id: Ie3ef6202b6a3a8521971e1be10c40c6a2db6989c
| * Check for window != 0 in QuickTestResult::grabImage().Friedemann Kleint2014-07-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38945 Change-Id: I081434a94899f8a1e2fd7275b67f62d06b56b0c2 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Add findChild to TestCase.Mitch Curtis2014-07-042-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for auto tests where it's necessary to have access to dynamically created child items. For example: property Component threeItemDelegate: Text { objectName: "delegate" + styleData.index text: styleData.value } ... function test_stuff() { ... var delegate0 = findChild(item, "delegate0"); // check delegate0 for some condition... } [ChangeLog][QtTest][TestCase] Added findChild function to TestCase. Change-Id: I04a8b07c9904768c07ec12f4b03f1afb1989e054 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Use the correct 'no-widgets' checkGunnar Sletta2014-06-181-1/+1
|/ | | | | Change-Id: I754f785625a534886c6c40f1e850b90cf2418297 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QtQuick test: Do not complain about Qt specific argumentsKai Koehne2014-04-031-17/+23
| | | | | | | | | | | | | | | Commit 1ca5e82cccae0 caused a regression for Qt arguments like -qmlsjsdebugger=xxx . These are automatically removed from argv by QCoreApplication, but since we copied argv before instantiating QCoreApplication this didn't have any effect. Fix this by moving Q[Core]Application instantiation again before the parsing and copying of testlib-specific arguments. Task-number: QTBUG-37793 Change-Id: Ief41640b6cf3251f700a5d24d2e1141233a3888f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* QML testlib: Do not modify the arguments passed into QGuiApplication.Friedemann Kleint2014-03-071-8/+6
| | | | | | | | | argc/argv passed into QGuiApplication must match those of main on Windows due to the special command line parsing. Task-number: QTBUG-36466 Change-Id: Id722692d2bdc18a6627fdaeffb349b78137ae314 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make sure the test window has focusAlbert Astals Cid2014-01-161-1/+2
| | | | | | | | | | | Some setups like xvfb-run under Linux do not focus windows after showing them, this means that any focus based test will fail since the windows itself is unfocused. This makes sure the test window will be shown and focused. Change-Id: I1903b7cdf88b772e1ca15acd4899695b49615712 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* ensure that qmltest users have CONFIG+=consoleOswald Buddenhagen2013-12-171-0/+4
| | | | | | | Task-number: QTBUG-35603 Change-Id: Ia337845004290d0e01c391130bbf55ec31e52c9e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update after changes to QTestResult API in qtbaseTor Arne Vestbø2013-09-271-1/+1
| | | | | Change-Id: I8a28418753a21c700a365dd369d7befa8ab14f76 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make parts of qv8engine_p.h GC safeLars Knoll2013-09-261-1/+1
| | | | | Change-Id: Iaa15423cedc307a09b3cd7287272d93d7a604caf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlV4Function API to be GC safeLars Knoll2013-09-261-8/+9
| | | | | Change-Id: Id4f79c22fc48ada1c8a9a858e1b7b3d1cf14d120 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove qSort usages from declarativeGiuseppe D'Angelo2013-09-131-1/+3
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-1/+1
| | | | | | | | Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmltest: Add QTestDefinedVariablesCaroline Chao2013-08-281-1/+10
| | | | | | | | | | | QTestDefinedVariables is used by the QTestRootObject to check is a preprocessor variable is defined. Adding QT_OPENGL_ES_2_ANGLE. It can be useful to know if it is defined (Win32 + Angle) while running a test. Change-Id: I2f9ffb1028c94095c711ab64737b53b60c055312 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qmltest: Register test object as a singletonCaroline Chao2013-08-281-9/+26
| | | | | | Change-Id: I5f6c404ff2901082f22b953b29aed08d3488f31d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * Doc: Fix module name formatSze Howe Koh2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Qt3D -> Qt 3D QtLocation -> Qt Location QtScript -> Qt Script Change-Id: Id59cb209e0e0407d564de0bfaab73990e64a02e6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Remove some more v8 usageLars Knoll2013-06-031-10/+7
| | | | | | | | | | Change-Id: I00c4a2403e12bc87743a073f245c38b007e9531d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup v8 dependencies from QQmlV8FunctionLars Knoll2013-05-082-5/+5
| | | | | | | | | | | | | | ... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Replace v8::Null() with QV4::Value::nullValue()Simon Hausmann2013-05-071-1/+1
| | | | | | | | | | Change-Id: I7901d5282afd71c1fd66bab223b2811f0d14b5f1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Get rid of v8::LocalLars Knoll2013-05-061-2/+2
| | | | | | | | | | | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move QV8Engine::to/fromVariant over to a v4 based APILars Knoll2013-05-011-1/+1
| | | | | | | | | | Change-Id: Ie44de10cbd970715345e2c428db666dc6233b39c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of QV8Engine::toString()Lars Knoll2013-04-291-1/+1
| | | | | | | | | | | | | | It's easier to use toQString() on a QV4::Value Change-Id: I9bf22cb72607b32948e77c632d2f9b8fe120ea41 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
|/ | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make keyClick/Press/Release work with a charAlbert Astals Cid2013-04-052-0/+34
| | | | | | Change-Id: Id821bddd993d4da4458464713a69edfea4aaecaa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-283-10/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>