summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2023-03-24 10:22:41 +0100
committerJonas Ådahl <jadahl@gmail.com>2023-04-20 14:49:38 +0200
commitd272b16e5066464f90273e95d3ce4c1f725a2880 (patch)
tree7a3b654e44a1862050eb7a4813b5010cb95707ed
parent2325022d2fa9600bcce108ad96734d4cc5d0cb23 (diff)
downloadgnome-shell-d272b16e5066464f90273e95d3ce4c1f725a2880.tar.gz
tests/perf: Add test for shutdown with open window
This would without the applied fix trigger https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6536. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
-rw-r--r--js/js-resources.gresource.xml1
-rw-r--r--js/perf/closeWithActiveWindows.js29
-rw-r--r--tests/meson.build3
3 files changed, 33 insertions, 0 deletions
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
index ba481aafa..c6e479150 100644
--- a/js/js-resources.gresource.xml
+++ b/js/js-resources.gresource.xml
@@ -36,6 +36,7 @@
<file>misc/weather.js</file>
<file>perf/basic.js</file>
+ <file>perf/closeWithActiveWindows.js</file>
<file>perf/core.js</file>
<file>perf/headlessStart.js</file>
<file>perf/hwtest.js</file>
diff --git a/js/perf/closeWithActiveWindows.js b/js/perf/closeWithActiveWindows.js
new file mode 100644
index 000000000..699b51a89
--- /dev/null
+++ b/js/perf/closeWithActiveWindows.js
@@ -0,0 +1,29 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+/* exported run */
+/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^malloc", "^glx", "^clutter"] }] */
+
+const Main = imports.ui.main;
+const Scripting = imports.ui.scripting;
+
+/** Run test. */
+async function run() {
+ /* eslint-disable no-await-in-loop */
+
+ /* Make created windows remain visible during exit. */
+ Scripting.disableHelperAutoExit();
+
+ Main.overview.hide();
+ await Scripting.waitLeisure();
+ await Scripting.sleep(1000);
+
+ await Scripting.createTestWindow({
+ width: 640,
+ height: 480,
+ });
+
+ await Scripting.waitTestWindows();
+ await Scripting.waitLeisure();
+ await Scripting.sleep(1000);
+
+ /* eslint-enable no-await-in-loop */
+}
diff --git a/tests/meson.build b/tests/meson.build
index 088a0ce5d..85339dd14 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -40,6 +40,9 @@ perf_tests = [
'name': 'basic',
},
{
+ 'name': 'closeWithActiveWindows',
+ },
+ {
'name': 'headlessStart',
'options': ['--hotplug'],
},