[mutter/wip/3v1n0/run-tests-in-ci: 5/14] tests, stacking: Add tests with no-input and no-take-focus windows
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/3v1n0/run-tests-in-ci: 5/14] tests, stacking: Add tests with no-input and no-take-focus windows
- Date: Wed, 14 Nov 2018 08:20:19 +0000 (UTC)
commit 26cb0a5a752d89face790592d8385f5513cba384
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue Nov 13 00:48:53 2018 -0600
tests, stacking: Add tests with no-input and no-take-focus windows
When a window with no frame, that doesn't accept focus and that has no take-focus
atom set is destroyed, we end up in not changing the current_focus window, causing
a crash.
Added test cases that verify this situation (expected to fail).
See #308
src/Makefile-tests.am | 3 +++
src/tests/meson.build | 3 +++
...ransient-no-input-no-take-focus-parent.metatest | 23 ++++++++++++++++++++
...ansient-no-input-no-take-focus-parents.metatest | 25 ++++++++++++++++++++++
.../closed-transient-no-input-parent.metatest | 22 +++++++++++++++++++
5 files changed, 76 insertions(+)
---
diff --git a/src/Makefile-tests.am b/src/Makefile-tests.am
index b38f9a57d..175611549 100644
--- a/src/Makefile-tests.am
+++ b/src/Makefile-tests.am
@@ -15,6 +15,9 @@ dist_stacking_DATA = \
$(srcdir)/tests/stacking/basic-x11.metatest \
$(srcdir)/tests/stacking/basic-wayland.metatest \
$(srcdir)/tests/stacking/closed-transient.metatest \
+ $(srcdir)/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest \
+ $(srcdir)/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest \
+ $(srcdir)/tests/stacking/closed-transient-no-input-parent.metatest \
$(srcdir)/tests/stacking/minimized.metatest \
$(srcdir)/tests/stacking/mixed-windows.metatest \
$(srcdir)/tests/stacking/set-parent.metatest \
diff --git a/src/tests/meson.build b/src/tests/meson.build
index ff7a875a3..fdf842759 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -87,6 +87,9 @@ stacking_tests = files([
'stacking/basic-wayland.metatest',
'stacking/client-side-decorated.metatest',
'stacking/closed-transient.metatest',
+ 'stacking/closed-transient-no-input-no-take-focus-parent.metatest',
+ 'stacking/closed-transient-no-input-no-take-focus-parents.metatest',
+ 'stacking/closed-transient-no-input-parent.metatest',
'stacking/minimized.metatest',
'stacking/mixed-windows.metatest',
'stacking/set-parent.metatest',
diff --git a/src/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest
b/src/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest
new file mode 100644
index 000000000..f0b4d6ccf
--- /dev/null
+++ b/src/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest
@@ -0,0 +1,23 @@
+new_client 1 x11
+create 1/1
+show 1/1
+wait
+
+create 1/2 csd
+set_parent 1/2 1
+take_focus 1/2 false
+accept_focus 1/2 false
+show 1/2
+wait
+
+create 1/3 csd
+set_parent 1/3 2
+show 1/3
+wait
+
+assert_stacking 1/1 1/2 1/3
+
+destroy 1/3
+wait
+
+assert_stacking 1/1 1/2
diff --git a/src/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest
b/src/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest
new file mode 100644
index 000000000..25bcc3c18
--- /dev/null
+++ b/src/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest
@@ -0,0 +1,25 @@
+new_client 1 x11
+create 1/1
+accept_focus 1/1 false
+take_focus 1/1 false
+show 1/1
+wait
+
+create 1/2 csd
+set_parent 1/2 1
+take_focus 1/2 false
+accept_focus 1/2 false
+show 1/2
+wait
+
+create 1/3 csd
+set_parent 1/3 2
+show 1/3
+wait
+
+assert_stacking 1/1 1/2 1/3
+
+destroy 1/3
+wait
+
+assert_stacking 1/1 1/2
diff --git a/src/tests/stacking/closed-transient-no-input-parent.metatest
b/src/tests/stacking/closed-transient-no-input-parent.metatest
new file mode 100644
index 000000000..af24a1072
--- /dev/null
+++ b/src/tests/stacking/closed-transient-no-input-parent.metatest
@@ -0,0 +1,22 @@
+new_client 1 x11
+create 1/1
+show 1/1
+wait
+
+create 1/2 csd
+set_parent 1/2 1
+accept_focus 1/2 false
+show 1/2
+wait
+
+create 1/3 csd
+set_parent 1/3 2
+show 1/3
+wait
+
+assert_stacking 1/1 1/2 1/3
+
+destroy 1/3
+
+wait
+assert_stacking 1/1 1/2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]