summaryrefslogtreecommitdiffstats
path: root/tests/auto/wasm
Commit message (Collapse)AuthorAgeFilesLines
* wasm: Fix stacking order problem for transient parent windowsEven Oscar Andersen2025-05-262-16/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows with a transient parent does not reflect the relationship in the stacking order. Essentially AboveTransientParent is missing as a configuration choice. What makes this slightly convoluted is that the window stack does not depend on the window (for testability). We solve this problem by making the stack and treenode templates, and provide test class as arguments when testing. QWasmWindow and QWasmScreen are not templated as before. There is also a new order type StayAboveTransientParent. Which means that we can no longer use order type to get to the group location (Since StayAboveTransientParent can map to either of the three types). The window stack tests have been updated to handle the StayAboveTransientParent type. Finally, we do not do anything with a normal parent child relationship as this should already work correctly. Fixes: QTBUG-131699 Change-Id: Ie08e18f9e0a2339175c4a09da0a831f031df71e1 Reviewed-by: Lorn Potter <[email protected]>
* Remove unnecessary widgets linking from autotestsJuha Vuolle2025-05-093-3/+0
| | | | | | | | | | | Unconditional linking breaks build when widgets are disabled. tst_localfileapi, tst_qwasmwindowstack, and tst_qwasmwindowtreenode tests link against Qt::Widgets, but does not use them => remove. Task-number: QTBUG-136101 Pick-to: 6.9 6.8 Change-Id: I6d895b5ddd85b3ace98e0e398d034006aee236e0 Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: streamline key eventsMorten Sørvig2025-01-291-40/+19
| | | | | | | | | | | | | Set the event type from the event handler instead of determining the event type at run-time based on string comparison. QWasmDeadKeySupport adds a complication. This can't be easily simplified or removed since it maintains state. Change-Id: Iad6f02ee7e2dc22817d7ac606514a2b4022f8fb0 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* wasm tests: Update window class in Selenium testPiotr Wierciński2024-12-201-1/+1
| | | | | | | | Rename qt-window to qt-decorated-window to follow changes introduced by: 2ab07b4558ce074fcd6cac699ea71df31fc324f5. Change-Id: I41f84cc201821d620be11b67939aa94664a8d208 Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm tests: Enable cross origin isolation for Selenium testsPiotr Wierciński2024-11-282-2/+2
| | | | | | | | This change enables running Selenium tests with multithreading. Change-Id: I2a3e170cb6681142193f33d45bb0d1733034e405 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* wasm: Fix focus handlingEven Oscar Andersen2024-11-262-0/+35
| | | | | | | | | | | | | | | | | | We had input handling enabled as a precondition for setting focus. This is wrong, we need to have the focus for toggle buttons and other non-input things as well. (Also toggle buttons act on spacebar). Also selects a new active window if the window that is active (i.e a dialog) is deleted. Also shift + tab did not always work, fixed to emit Key_Backtab Fixes: QTBUG-130371 Pick-to: 6.8 Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5 Reviewed-by: Morten Johan Sørvig <[email protected]>
* CMake: Fix PUBLIC_LIBRARIES option is deprecated in tests warningAlexandru Croitor2024-10-293-6/+3
| | | | | | | | | Rename it to just LIBRARIES, as PUBLIC_LIBRARIES is not meant to be used in tests. Pick-to: 6.8 Change-Id: Idcf35e2834de44b2dd8d11cdef0205b11e89d377 Reviewed-by: Alexey Edelev <[email protected]>
* wasm: Fix tooltip visibleEven Oscar Andersen2024-10-152-2/+36
| | | | | | | | | | Fixes a problem where tooltips only worked for the first instance activated. Fixes: QTBUG-129234 Pick-to: 6.8 Change-Id: I45619b1ca8001b74b148b98a8795000630dcacf7 Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: Disable Selenium tests on CI until they are stablePiotr Wierciński2024-10-081-1/+2
| | | | | | Task-number: QTBUG-129735 Change-Id: Iee85c2b9570596ba2f46db096217a1306e149447 Reviewed-by: Volker Hilsheimer <[email protected]>
* tests: Use Chrome provided by env var for Selenium testsPiotr Wierciński2024-09-161-5/+8
| | | | | | | | | Use Chrome and chromedriver version provided by env var for better test stability. Change-Id: I95cb53b40e4b04054327044ca4768dfa0cf15e06 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* wasm: Fix conflict usage for tst_qwasmwindow_harness.htmlEven Oscar Andersen2024-09-053-3/+4
| | | | | | | | | | | | | There is a default tst_qwasmwindow_harness.html created, and we have our own in addition. This creates problems if one runs configure and do not perform a clean build afterwards as we would be left with the autogenerated file. The solution is to rename our custom file so that there is no conflict. Change-Id: I1f0436eea752059d4dcf22407c760339eed46c09 Reviewed-by: Piotr Wierciński <[email protected]>
* wasm: disable spinbox context menu if not ASYNCIFY to avoid deadlockEven Oscar Andersen2024-09-052-33/+106
| | | | | | | | Using exec will lock the application if asyncify is not used Fixes: QTBUG-120925 Change-Id: Ic8b3acc402f3ecbfb07fd8cb80013e02e2421402 Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: Fix handling of native windowsEven Oscar Andersen2024-06-132-6/+94
| | | | | | | | | | | | | | | There are two problems 1) internal (not toplevel) windows needs to have the frameLess attribute set. Without this attribute the window is not visible 2) The backingstore needs to use the correct window, if not the symptoms are that the display is not always correctly updated. Seen in the qtdoc/examples/demos/documentviewer demo Fixes: QTBUG-125856 Change-Id: I040d963c0c130214cc70a607090faa006c02f981 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Add copyright and licensing to build system files missing itLucie Gérard2024-05-211-0/+2
| | | | | | | Task-number: QTBUG-124453 Change-Id: Ibb6a0ab839a16ceef3c68861bac2f508ddb3d1ae Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* wasm: Allow fetching from background threadPiotr Wierciński2024-05-101-2/+0
| | | | | | | | | | | | | | | | | Allow network request from background thread by proxing it to main thread if needed. Introduce "fetchHelper" which is stored on heap and owns "outgoingData" which must be valid during entire fetch operation. It is also used for synchronization between thread that has scheduled fetch operation and the one that is executing it. Enable the test that was skipped before fix. Fixes: QTBUG-124111 Change-Id: Ifafa4c40fa435122639fa861a61fbf96340a7747 Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Jøger Hansegård <[email protected]>
* Add copyright and licensing to .bat files missing themLucie Gérard2024-05-081-0/+2
| | | | | | Task-number: QTBUG-124453 Change-Id: I8bd48ab5d5b18197ef5bf9a46edf49da86374bee Reviewed-by: Joerg Bornemann <[email protected]>
* wasm: move wasm tests to own subdirectoriesMorten Sørvig2024-04-1511-40/+102
| | | | | | | | Match the standard one-test-per-directory setup. Change-Id: I0e29e3c5626ef5f739b1680d53a2a74f0c77f9be Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Jøger Hansegård <[email protected]>
* Revert "wasm: Proxy emscripten_fetch() to the main thread"Piotr Wierciński2024-04-051-0/+1
| | | | | | | | | | | | This reverts commit f2f2b6ef18907a76461b54e110618e7840971fa7. Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there. Pick-to: 6.5 6.6 6.7 Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Even Oscar Andersen <[email protected]>
* wasm: Disable failing selenium test temporarilyPiotr Wiercinski2024-04-031-0/+2
| | | | | | | Task-number: QTBUG-123942 Change-Id: I89ee1ce70fba69c9b2d6109669186a06a92da039 Reviewed-by: Even Oscar Andersen <[email protected]> Reviewed-by: Tor Arne Vestbø <[email protected]>
* wasm: Document and test OpenGLContext limitationsEven Oscar Andersen2024-03-226-32/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a limit in WebGL that OpenGL context sharing is not supported. There is a proposal from 2013 (https://www.khronos.org/webgl/wiki/SharedResouces), but it seems that it never was implemented. There is an additional limit in that there is exactly one WebGL context for each canvas (i.e. window). A part of the problem here is that the identifier for an OpenGL context is essentially a surface-thread-context triplet. And the thread part might be more difficult to handle in a javascript setting. Regardless of why, we need to have an opinion about what the consequences are, and what we support to what extent. As such this commit: 1) Adds a comment on the QOpenGLContext describing the limitations 2) Adds a qWarning() on the first activation of a shared context. The second item is not complete. We will have problems with multiple individual contexts also, It is just not possible to warn for these cases. The second item covers, maybe, the most common case. Change-Id: I51550a6acb0a7f6f6fa5e9e2c3da080a1d2b498f Reviewed-by: Morten Johan Sørvig <[email protected]>
* wasm: Qt::WA_ShowWithoutActivating was not respectedEven Oscar Andersen2024-03-213-6/+218
| | | | | | | | | | | | The Qt::WA_ShowWithoutActivating flag was not respected Added test in the part of the code that calls requestActivateWindow Added selenium focus test Fixes: QTBUG-122776 Change-Id: I1a248ed4352f86376d615a4cb7022e7ea095d4e7 Reviewed-by: Piotr Wierciński <[email protected]>
* wasm: Fix minimum and default window sizesPiotr Wierciński2024-03-191-2/+1
| | | | | | | | | Remove minimum window size restriction. User should be able to change minimum window size if needed. Set default size to 160x160 to match other platforms. Change-Id: Ic199fc34982021ba38d631476fbb1c51370b2e8e Reviewed-by: Tor Arne Vestbø <[email protected]>
* Revert "wasm: Temporarily disable selenium tests"Piotr Wierciński2024-03-191-0/+1
| | | | | | | | | This reverts commit c2b359721dfb112df9df251d9a5bbdc88033f08d. Reason for revert: Required fixes have been merged Change-Id: I2314323e7ee673fe4136ce4ac4f867ac18dcd2e6 Reviewed-by: Simo Fält <[email protected]>
* wasm: Enable the selenium tests on windowsEven Oscar Andersen2024-03-152-2/+24
| | | | | | | | python must be installed with higest version 3.11 Change-Id: I14ca5fa09b088903c95b2f6e2d6ace8400a7b015 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]>
* CMake: Make a few more auto tests standaloneAlexandru Croitor2024-03-141-1/+1
| | | | | | Pick-to: 6.7 Change-Id: I80988114bd906447a2ab712d5432a489e095a5c1 Reviewed-by: Joerg Bornemann <[email protected]>
* wasm tests: Use WebDriverManager to install chromedriverPiotr Wiercinski2024-03-131-4/+4
| | | | | | | | | | Use WebDriverManager to install the correct version of chromedriver. This will help avoiding mismatch of Chrome/chromedriver versions, which sometimes happen in CI. Fixes: QTBUG-122729 Change-Id: I40cf62c02c2cb6f57b031cc83b9fa38f6ed2610e Reviewed-by: Simo Fält <[email protected]>
* wasm: Temporarily disable selenium testsPiotr Wierciński2024-03-071-1/+0
| | | | | | Task-number: QTBUG-122729 Change-Id: I923edcd10d410e7836b5e3868d11d14dcd3e1c13 Reviewed-by: Simo Fält <[email protected]>
* wasm: Make sure we can add screen after releaseRequestUpdateHold has been calledEven Oscar Andersen2024-03-051-4/+4
| | | | | | | | | | | | | | Before this fix, such screens would not render due to requestUpdateHold is initialized to true and never reset. The fix is to change the requestUpdateHold member to be a static variable, so that it can be read by screens added after requestUpdateHold has been called. Also, add a test that would fail without this fix Change-Id: Idf2ac916766a03480272cd550f9d1ab7fc5c5158 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]>
* Correct license for tools filesLucie Gérard2024-03-052-2/+2
| | | | | | | | | | | | According to QUIP-18 [1], all tools file should be LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: Icd5d5be2e04819617e68ff142924de1773bebbad Reviewed-by: Kai Köhne <[email protected]>
* wasm: Refractor Selenium manual test into auto testPiotr Wierciński2024-02-0711-67/+1434
| | | | | | | | | | | | | | Using Selenium for WebAssembly testing enables us to test user interactions, which is very valuable. Turning this test into automated allows us to run it in CI pipeline. This will help with detecting regressions. Two of these tests are currently failing on CI machine and they have been temporarily disabled. Change-Id: I754dd05955e55eb031070f5328ef715b7826c2b5 Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Change license for tests filesLucie Gérard2024-02-045-5/+5
| | | | | | | | | | | | 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 tests: Add test for making network requestPiotr Wierciński2023-12-192-0/+97
| | | | | | | | | | | Add test for making network request via Emscripten Fetch API on main and background thread. Task-number: QTBUG-118225 Change-Id: I7c3923493818e75a5c16e4e5f553a69cb1438c44 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Morten Johan Sørvig <[email protected]> Reviewed-by: Piotr Wierciński <[email protected]>
* CMake: Remove deprecated PUBLIC_LIBRARIES option in wasm testsAlexandru Croitor2023-11-291-3/+0
| | | | | | | | Tests should only use the LIBRARIES option. Pick-to: 6.5 6.6 Change-Id: I3c1e4a563448e8f97219c10566cea921a2807abc Reviewed-by: Alexey Edelev <[email protected]>
* CMake: Make qtbase tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982 Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Amir Masoud Abdol <[email protected]>
* Support child windows on WASMMikolaj Boc2023-06-152-0/+270
| | | | | | | | | | | | | | Setting parents for WASM platform windows is now supported. This means that windows now reside in a hierarchical window tree, with the screen and individual windows being nodes (QWasmWindowTreeNode), each maintaining their own child window stack. The divs backing windows are properly reparented in response to Qt window parent changes, so that the html structure reflects what is happening in Qt. Change-Id: I55c91d90caf58714342dcd747043967ebfdf96bb Reviewed-by: Morten Johan Sørvig <[email protected]>
* Support filter list for file input when opening a file on WASMMikolaj Boc2023-03-071-37/+76
| | | | | | | | | | The polyfill for file input on WASM now makes use of the supplied filter list. Some changes were introduced in the abstraction for filters so that they are usable both for the new file API and the legacy file input. Change-Id: Id6341be4d6a1647e17382d13da7be42491cfaf80 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Support always on top/bottom window flags on WASMMikolaj Boc2023-02-221-82/+524
| | | | | | | | | | | | | | | | | | The window stack will now upkeep three groups of windows, always on bottom (1), regular (2), always on top (3). Windows belonging to (3) will always appear on top of (2) and (1), and windows from (2) will always appear on top of (1). The first window created in the application gets the (1) status, which is in line with the root window mechanism used before. Activation has now been decoupled from the top position on the window stack as a window in (1) or (2) may be active, in spite of the top window belonging to a higher group. Fixes: QTBUG-110098 Change-Id: I51f4d2d47163fab26ce5ef28f7a4f23a522c7f91 Reviewed-by: Lorn Potter <[email protected]>
* Fix the handling of dead keys and test the mechanismMikolaj Boc2023-02-142-0/+436
| | | | | | | | | | | | | | An effort has been made to support more keyboard layouts that provide dead keys (US international, Mac-specific dead keys). The dead key is translated now at the event conversion phase, not when it is actually used for modifying keys, which simplifies the logic. Unittests have been created to check the translation mechanism. Fixes: QTBUG-86272 Change-Id: I07f7d63f5a37f8469c693b034b400da99379f519 Reviewed-by: Lorn Potter <[email protected]>
* Fix typo in QWasmWindowStack's nameMikolaj Boc2022-10-201-11/+11
| | | | | | | 'Wasm' in it is duplicated. Change-Id: Ie00e02fb7ae4d9e13f490ce2d46a4eabf3f5710c Reviewed-by: Lorn Potter <[email protected]>
* Fix QWasmWindowStack::topWindow when the stack is emptyMikolaj Boc2022-09-121-0/+27
| | | | | | | | | | | The method should by contract return nullptr when the stack is empty, but it crashes in this case. Also, unit-test the case. Pick-to: 6.4 Change-Id: If64b71e761efd9a5cd5af407cd68cba7f8dbc8e2 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Adapt tests/auto/wasm for batchingMikolaj Boc2022-08-301-1/+0
| | | | | | | Use consistent defines across both tests in the directory Change-Id: Idd84603135c8c164d09ae41d5faa7ca3a5fc7c3c Reviewed-by: Morten Johan Sørvig <[email protected]>
* Resolve window focusing problems on WASMMikolaj Boc2022-08-241-32/+13
| | | | | | | | | | | | - Moved the modal window resolution to QWasmWindow::requestActivateWindow so that multiple async activation events are not issued in unpredictable patterns. - Request activation on added windows and on stack top in case of window removal Pick-to: 6.4 Change-Id: I6f02cf1b7e83abb7961caf311ffc83e91c8bf810 Reviewed-by: Morten Johan Sørvig <[email protected]>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* Maintain the window z-order properly in wasm compositorMikolaj Boc2022-08-162-0/+277
| | | | | | | | | | | | | The old stack structure used to keep track of windows has been improved to conform to the actual windowing assumptions: there shall be one root window, which is always at the bottom. The first created window immediately becomes the root window. Should the root window be removed, all windows are non-root, i.e. any of them can become the top-level window Fixes: QTBUG-105094 Pick-to: 6.4 Change-Id: Ic553244fa9f5bc3ee590b702935e66cfc62d5f8f Reviewed-by: Morten Johan Sørvig <[email protected]>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <[email protected]>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+0
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <[email protected]>
* Port promise tests to qtwasmtestlibMikolaj Boc2022-07-062-643/+0
| | | | | | | | | The promise tests have been ported to qtwasmtestlib so that they do not have to use asyncify anymore. Task-number: QTBUG-99611 Change-Id: Id1b5742c90e36a89540e7a2387cb4110c21ace9b Reviewed-by: Morten Johan Sørvig <[email protected]>
* Create the Qt File Filter => showOpen/SaveFilePicker options mapperMikolaj Boc2022-07-052-0/+235
| | | | | | | | | | | | | As a preparatory measure for using showXFilePicker, the Qt file filter has to be transformed to the format used by the showXFilePicker (sXFP) options. A class structure reflecting the options was created. Based on an input in the form of a qt file filter, it will parse the filter to the sXFP options format. Unit tests were added and the code is not yet used in non-test env, next change will use it. Task-number: QTBUG-99611 Change-Id: I277286467a7b5ce6f323c19bdd31740a41b6a6be Reviewed-by: Morten Johan Sørvig <[email protected]>
* Create a promise wrapper for C++ and port existing usesMikolaj Boc2022-06-302-0/+646
Currently, to use a promise from C++ we either have to use an ASM block (which does not work well with dynamic linking) or declare exports in the EMSCRIPTEN_BINDINGS block, which is cumbersome and cannot be chained. This solution makes it easy to use js promises by introducing the WebPromiseManager which dispatches callbacks to appropriate callers when available. This is a preliminary patch for FileSystem support, which will heavily use async APIs. Task-number: QTBUG-99611 Change-Id: I368a8f173027eaa883a9ca18d0ea6a3e99b86071 Reviewed-by: Morten Johan Sørvig <[email protected]>