diff options
author | Even Oscar Andersen <[email protected]> | 2024-03-01 11:32:05 +0100 |
---|---|---|
committer | Even Oscar Andersen <[email protected]> | 2024-03-05 17:58:14 +0100 |
commit | d8a6a9bfcbaec96156751c0ecaf2aa78e4e8c9e8 (patch) | |
tree | 96729e80e536737c16c43025b9f6c385fe312cca /tests/auto/wasm/selenium/qwasmwindow.py | |
parent | e06c67d448a6b4684d9787e9c18ec12f884b7063 (diff) |
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 <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
Diffstat (limited to 'tests/auto/wasm/selenium/qwasmwindow.py')
-rw-r--r-- | tests/auto/wasm/selenium/qwasmwindow.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/wasm/selenium/qwasmwindow.py b/tests/auto/wasm/selenium/qwasmwindow.py index d66d57981a6..eaad7c4e00c 100644 --- a/tests/auto/wasm/selenium/qwasmwindow.py +++ b/tests/auto/wasm/selenium/qwasmwindow.py @@ -372,8 +372,6 @@ class WidgetTestCase(unittest.TestCase): self.assertFalse(w4 in screen.query_windows()) - #TODO FIX - @unittest.skip('Does not work currently') def test_window_painting(self): screen = Screen(self._driver, ScreenPosition.FIXED, x=0, y=0, width=800, height=800) @@ -389,13 +387,15 @@ class WidgetTestCase(unittest.TestCase): self.assertEqual(w1.color_at(0, 0), Color(r=0, g=255, b=0)) - w1_w1 = Window(parent=w1, rect=Rect(x=100, y=100, width=400, height=400), title='w1_w1') + w1_w1 = Window(parent=screen, rect=Rect(x=100, y=100, width=400, height=400), title='w1_w1') + w1_w1.set_parent(w1) w1_w1.set_background_color(Color(r=0, g=0, b=255)) wait_for_animation_frame(self._driver) self.assertEqual(w1_w1.color_at(0, 0), Color(r=0, g=0, b=255)) - w1_w1_w1 = Window(parent=w1_w1, rect=Rect(x=100, y=100, width=200, height=200), title='w1_w1_w1') + w1_w1_w1 = Window(parent=screen, rect=Rect(x=100, y=100, width=200, height=200), title='w1_w1_w1') + w1_w1_w1.set_parent(w1_w1) w1_w1_w1.set_background_color(Color(r=255, g=255, b=0)) wait_for_animation_frame(self._driver) |