aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-0/+6
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quick/doc/src/qmltypereference.qdoc Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
| * testlib: print out milliseconds for datetimeLiang Qi2017-06-161-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-32555 Change-Id: I9219c8a7199d4db27c3d160de2544f0a7cb320a6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-151-0/+6
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Change-Id: I3c41b9fc9ba7d41741e4dd400402ae80dd7726d9
| * qmltest: fix compare() for urlsLiang Qi2017-06-141-0/+6
| | | | | | | | | | | | | | | | url is object, but without any property. Task-number: QTBUG-61297 Change-Id: I68b0523be54e4d42f57267205ba8d66ff4ac4e30 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | TestCase: Grow some new functionality on grabImageRobin Burchell2017-05-111-1/+39
|/ | | | | | | | | | | | | | | | | | | | | Add some meta-information about the image that we can use to do slightly stronger checks than just blindly poking pixel data (width & height props). In addition, when a test of a grabbed image fails (which they certainly do), it is always nice if we can perform some diagnostics. To this end, add a save() method to save the grabbed QImage to disk. Tests for the new functionality are blacklisted on Linux at present, as they do not yet appear stable, inheriting the other tst_grabImage flakiness. [ChangeLog][QmlTest] The returned object from TestCase::grabImage now has 'width', 'height', and 'size' properties for additional verification. In addition, there is a save() method to be able to persist the grabbed image to disk (for diagnostics purposes, for example). Change-Id: Ic651e0257102c514c39c3f648c05870f9d9c52e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+1
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtQuickTest::mouseEvent(): pass QPointF by referencev5.9.0-alpha1J-P Nurmi2017-02-211-1/+1
| | | | | | | | | | | | | | | MSVC 2015 64-bit has some unexplainable issues with a static inline function calling itself recursively, like mouseEvent(MouseClick) does. The QPointF argument, which was previously passed by value, somehow lost its y-coordinate and caused consistent test failures in QQC1 tst_extras/tst_piemenu. I can't explain why this change fixes the issue, but it's a harmless improvement that unblocks the CI. Change-Id: I90dd36a676a21c8124f233e1fa8b3864946a326d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Liang Qi <liang.qi@qt.io>
* quicktest: Don't warn if the root item has no sizeRobin Burchell2016-12-221-3/+0
| | | | | | | | | | | | It could be argued that all callers should be fixed, but this warning has existed since 2012 and even our own tests do not all set sizes, so I think that battle is a lost fight. This helps make real problems with the tests more visible. Change-Id: Ie29521695ef11943154dae40726d194dc72316c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-143-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
| * Get rid of most QT_NO_FOO usagesLars Knoll2016-11-293-4/+4
| | | | | | | | | | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add touch event support to qmltestJeremy Katz2016-12-063-1/+118
| | | | | | | | | | | | | | | | | | [ChangeLog][QuickTest] Add support for simulating touch events from TestCase. Task-number: QTBUG-23083 Change-Id: Ic045e00a91b8270b6f08d398323e06b576615e79 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-231-0/+1
|\| | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4object_p.h Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
| * Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-11-151-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4string.cpp The conflict resolution for qv4tsring.cpp is to essentially omit the change of commit 64714ea431f2fd355ed27edc69dba4e992511e75 as the code in 5.8 already uses the add/mul_overflow functions. This merge also reverts commit f4ac007f4a19bc095ff15d415a6629986de78e49 as we can deal with dead store elimination now. Change-Id: Iee08c87cbe1a2ff23a73ce621d56262b4e007c56
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmldevtools/qmldevtools.pro tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp Change-Id: I12255c16716bd8a74e7047cdb1f9302a4d1ea827
| | | * Fix QtQuickTest::mouseMove not having timestampsFrederik Gladhorn2016-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af002b8df9b084fd7f26e9eead9844aab36bdc4d added timestamps to press and release events. It did not add the timestamp to move events though. When using the quick test functionality to send events to flickable, this leads to great confusion since the move events will be from a completely different time than the release, in which case flickable responds with "you waited a long time before releasing, I think you didn't want to flick". Adding the timestamp also to move events is consistent and makes tests in qtlocation happy. Change-Id: I33653c435eff5b62eeaf5a03653d917b7acc4fed Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-121-1/+9
| | |\| | | | | | | | | | | | | Change-Id: Ib31008e593442ca5813fb14ae6b02f7ab2577395
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-182-1/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * | | qmltest: Fix build on Windows 32bitFriedemann Kleint2016-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define NOMINMAX for windows.h included via the private headers of the benchmark code to prevent it from clashing with qnumeric_p.h. Change-Id: I72daf23cda3ad67c580e14b8c92f97b5c97f8c58 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Merge remote-tracking branch 'origin/5.6' into 5.8Simon Hausmann2016-10-131-1/+9
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I175b27337b534c0b8f46a4a792d2c43cde73ffc4
| | * | testlib: Add timestamp to mouse click eventsPeter Varga2016-10-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timestamp is necessary for testing custom mouse event handlers e.g. what Qt WebEngine uses for handling triple and quadruple mouse clicks. Based on Qt Base commit 181ee8f9ffacc51265ccc3a0005bf146f230cf85 Task-number: QTBUG-56223 Change-Id: I84d0ca40767d0b1dccb33da1fb1f6ff5721d1096 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | optimize string usage: use fromLatin1() lessAnton Kudryavtsev2016-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. to reduce allocations. Replace fromLatin1 with QLatin1String or with QStringBuilder where it is possible. Change-Id: I09c7242fa7b118447b51239e2a6743a34fb3de14 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | allow quick test events to directly target a WindowJeremy Katz2016-08-221-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QuickTestEvent::eventWindow() is used to determine the window a QObject-based item cast to a QQuickItem is associated with. The window is then used to dispatch simulated events and calculate item positions. This change allows a quick Window or other QWindow-based object to be used directly. Change-Id: I85866ca4c79d5b6a48bac554608cad348aeb6e98 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-192-4/+11
|\ \ \ | | |/ | |/| | | | Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-192-4/+11
| |\| | | | | | | | | | Change-Id: I7bd70996e3372d154c6b0e47336baa22146667b0
| | * TestCase::mouseDrag: set mouse move delay >= 1 msShawn Rutledge2016-08-192-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Infinite-speed drags do not work well with velocity-sensitive components like Flickable. As with change d04982dc on qtbase, adding a short delay helps to stabilize tests. To keep it flexible, we make QTest::defaultMouseDelay() available via the qtest_events.defaultMouseDelay property. So the delay can be increased by passing a larger delay value to mouseDrag, or by changing the QTEST_MOUSEEVENT_DELAY environment variable (as before). Task-number: QTBUG-55382 Change-Id: I8f8088758a206be104a439ee0d1832eeca574e8c Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | | QmlTest: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-112-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | And add QT_NO_FOREACH define to .pro file. Now QmlTest is 'foreach' free. Change-Id: I17d8563cafd34bb90fe455ae955da5c56fbd2899 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Don't set QT_QML_DEBUG_NO_WARNING on -no-qml-debugUlf Hermann2016-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | It won't work anyway. Change-Id: I2bc8f6b1b72cf30f0314ad551838db4f04c11297 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Imports, Plugins, Quick: replace QStringLiteral with QL1SAnton Kudryavtsev2016-06-091-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | .. in such cases: - if there is overloaded function - in QStringBuilder expressions Result: reducing .rodata Change-Id: I972bc0a61df7b5567c40329dd47e77176d9a5b96 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-201-0/+1
| | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-3/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| * Use pixel() instead of scanLine() to check the colorAndy Shaw2016-03-241-3/+1
| | | | | | | | | | | | | | | | | | For some image formats it is not possible to rely on scanLine() so it is best to use pixel() for this check as it will take into account the format of the image correctly. Change-Id: Iee753b79291f210d243a5aed9d61359c67a78931 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-2/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-2/+2
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I5928f853a1d13b6a73533f9c6f6eae9da0e52a26 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-1/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * QuickTest, QmlImportScanner: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-1/+1
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: Ia157618cf870870f24c4a2962a385962da819275 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-198-112/+160
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* 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>