Commit Graph

6 Commits

Author SHA1 Message Date
Lucie Gérard
ea7a3105de Use SPDX license identifiers
Amends commit 05fc3aef53.
Some files were still missing.

Task-number: QTBUG-67283
Change-Id: I78b3cbf31138192805b7e186337c6fda4ac844aa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-11-15 07:50:17 +00:00
Morten Sørvig
ad0cb1f32d wasm: add "skip" support to qtwasmtestlib
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ø <tor.arne.vestbo@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-08-17 04:52:46 +02:00
Mikolaj Boc
f8e460b915 Use the local file APIs to save/load files on WASM
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ø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-08-12 20:32:29 +02:00
Morten Sørvig
964765f686 wasm: add event loop auto test
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 <lorn.potter@gmail.com>
2022-08-08 18:14:28 +02:00
Mikolaj Boc
3ca167a30e Enhance the qtwasmtestlib with comparison functions and status reporting
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 <morten.sorvig@qt.io>
2022-07-05 21:18:30 +02:00
Morten Johan Sørvig
122aa530d6 wasm: add qtwasmtestlib
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 <Mikolaj.Boc@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-29 15:09:02 +02:00