summaryrefslogtreecommitdiffstats
path: root/tests/manual/wasm/qtwasmtestlib/qtwasmtestlib.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <[email protected]>
* wasm: add "skip" support to qtwasmtestlibMorten Sørvig2022-08-171-2/+15
| | | | | | | | | | | We're not looking to skip faulty tests, but there are cases where we would like to indicate that a test function exists but can't run because some precondition is not met. Pick-to: 6.4 Change-Id: Ifaaafcfa7a55beaaf56d8b25fabbe3dc2566350f Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Mikołaj Boc <[email protected]>
* Use the local file APIs to save/load files on WASMMikolaj Boc2022-08-121-0/+12
| | | | | | | | | | | | QFileDialog::saveFileContent, QFileDialog::getOpenFileContent are now using local file APIs to access files on any browser that passes a feature check. The feature is thoroughly tested using sinon and a new mock library. Task-number: QTBUG-99611 Change-Id: I3dd27a9d21eb143c71ea7db0563f70ac7db3a3ac Reviewed-by: Tor Arne Vestbø <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: add event loop auto testMorten Sørvig2022-08-081-1/+6
| | | | | | | | | | Add basic tests for timers and event processing, for different use cases such as on the main thread, on a secondary thread, and with asyncify. Pick-to: 6.4 Change-Id: Ie0f82b5de97f639867b1e65dbb0ab8b11db86f85 Reviewed-by: Lorn Potter <[email protected]>
* Enhance the qtwasmtestlib with comparison functions and status reportingMikolaj Boc2022-07-051-14/+24
| | | | | | | | | | Added the functionality to report text statuses from tests, reporting file and line of assertion failures. Refactored the qtwasmtestlib.js for improved stability. Task-number: QTBUG-99611 Change-Id: I717e0cc38ac7f155fe870710f6b5e4bfb81b9317 Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: add qtwasmtestlibMorten Johan Sørvig2022-06-291-0/+135
qtwasmtestlib supports writing asynchronous tests for the web platform. Asynchronous test functions differ from normal test functions in that they allow returning from the test function before the test has completed: void TestObject::testTimer() { QTimer::singleShot(100, [](){ completeTestFunction(); // Test pass if we get here }); } Currently one logging backend is supported which writes the results to an html element. See the README file for further documentation. Change-Id: Ia633ad3f41a653e40d6bf35dd09d62a97c608f84 Reviewed-by: Mikołaj Boc <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>