15 Commits

Author SHA1 Message Date
Piotr Wierciński
bc521b68a6 wasm tests: Update window class in Selenium test
Rename qt-window to qt-decorated-window to follow changes introduced by:
2ab07b4558ce074fcd6cac699ea71df31fc324f5.

Change-Id: I41f84cc201821d620be11b67939aa94664a8d208
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-12-20 15:38:31 +00:00
Even Oscar Andersen
ef8bf4c2cf wasm: Fix focus handling
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 <morten.sorvig@qt.io>
2024-11-26 16:25:11 +01:00
Even Oscar Andersen
d69348ed4d wasm: Fix tooltip visible
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 <morten.sorvig@qt.io>
2024-10-15 17:25:47 +02:00
Piotr Wierciński
8b42efcbc2 tests: Use Chrome provided by env var for Selenium tests
Use Chrome and chromedriver version provided by env var for
better test stability.

Change-Id: I95cb53b40e4b04054327044ca4768dfa0cf15e06
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-09-16 16:40:23 +02:00
Even Oscar Andersen
cd78cf27a1 wasm: Fix conflict usage for tst_qwasmwindow_harness.html
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 <piotr.wiercinski@qt.io>
2024-09-05 17:28:19 +02:00
Even Oscar Andersen
00ce86a908 wasm: disable spinbox context menu if not ASYNCIFY to avoid deadlock
Using exec will lock the application if asyncify is not used

Fixes: QTBUG-120925
Change-Id: Ic8b3acc402f3ecbfb07fd8cb80013e02e2421402
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-09-05 16:43:52 +02:00
Even Oscar Andersen
1b220e1db8 wasm: Fix handling of native windows
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 <morten.sorvig@qt.io>
2024-06-13 19:33:21 +02:00
Piotr Wiercinski
b058a9c712 wasm: Disable failing selenium test temporarily
Task-number: QTBUG-123942
Change-Id: I89ee1ce70fba69c9b2d6109669186a06a92da039
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-03 10:11:09 +02:00
Even Oscar Andersen
043ceca40f wasm: Document and test OpenGLContext limitations
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 <morten.sorvig@qt.io>
2024-03-22 13:51:33 +01:00
Even Oscar Andersen
0737fca6b2 wasm: Qt::WA_ShowWithoutActivating was not respected
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 <piotr.wiercinski@qt.io>
2024-03-21 17:50:00 +01:00
Piotr Wierciński
cd2e1b0b4b wasm: Fix minimum and default window sizes
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ø <tor.arne.vestbo@qt.io>
2024-03-19 11:51:00 +01:00
Piotr Wiercinski
05f4a77e17 wasm tests: Use WebDriverManager to install chromedriver
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 <simo.falt@qt.io>
2024-03-13 09:19:48 +00:00
Even Oscar Andersen
d8a6a9bfcb wasm: Make sure we can add screen after releaseRequestUpdateHold has been called
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 <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-03-05 17:58:14 +01:00
Lucie Gérard
7b6289a035 Correct license for tools files
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 <kai.koehne@qt.io>
2024-03-05 12:59:21 +01:00
Piotr Wierciński
d2862a8f02 wasm: Refractor Selenium manual test into auto test
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 <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-07 13:15:09 +01:00