2023-03-24 09:22:41 +00:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
/* eslint camelcase: ["error", { properties: "never", allow: ["^script_", "^malloc", "^glx", "^clutter"] }] */
|
|
|
|
|
2023-07-11 12:57:41 +00:00
|
|
|
import Clutter from 'gi://Clutter';
|
2023-03-24 10:28:11 +00:00
|
|
|
|
2023-03-24 09:22:41 +00:00
|
|
|
const Main = imports.ui.main;
|
|
|
|
const Scripting = imports.ui.scripting;
|
|
|
|
|
|
|
|
/** Run test. */
|
2023-06-13 00:13:01 +00:00
|
|
|
export async function run() {
|
2023-03-24 09:22:41 +00:00
|
|
|
/* eslint-disable no-await-in-loop */
|
|
|
|
|
|
|
|
/* Make created windows remain visible during exit. */
|
2023-05-27 01:19:39 +00:00
|
|
|
await Scripting.disableHelperAutoExit();
|
2023-03-24 09:22:41 +00:00
|
|
|
|
2023-03-24 10:28:11 +00:00
|
|
|
const seat = Clutter.get_default_backend().get_default_seat();
|
|
|
|
const virtualDevice_ =
|
|
|
|
seat.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
|
|
|
|
|
2023-03-24 09:22:41 +00:00
|
|
|
Main.overview.hide();
|
|
|
|
await Scripting.waitLeisure();
|
|
|
|
await Scripting.sleep(1000);
|
|
|
|
|
|
|
|
await Scripting.createTestWindow({
|
|
|
|
width: 640,
|
|
|
|
height: 480,
|
2023-03-24 10:28:11 +00:00
|
|
|
textInput: true,
|
2023-03-24 09:22:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
await Scripting.waitTestWindows();
|
|
|
|
await Scripting.waitLeisure();
|
|
|
|
await Scripting.sleep(1000);
|
|
|
|
|
|
|
|
/* eslint-enable no-await-in-loop */
|
|
|
|
}
|