From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- ..._state_in_contenteditable_on_readonly_change.js | 616 +++++++++++++++++++++ 1 file changed, 616 insertions(+) create mode 100644 widget/tests/file_test_ime_state_in_contenteditable_on_readonly_change.js (limited to 'widget/tests/file_test_ime_state_in_contenteditable_on_readonly_change.js') diff --git a/widget/tests/file_test_ime_state_in_contenteditable_on_readonly_change.js b/widget/tests/file_test_ime_state_in_contenteditable_on_readonly_change.js new file mode 100644 index 0000000000..9f1ab2d305 --- /dev/null +++ b/widget/tests/file_test_ime_state_in_contenteditable_on_readonly_change.js @@ -0,0 +1,616 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +/* import-globals-from file_ime_state_test_helper.js */ + +class IMEStateInContentEditableOnReadonlyChangeTester { + // Runner only fields. + #mEditingHost; + #mFocusElement; + #mWindow; + + // Tester only fields. + #mTIPWrapper; + #mWindowUtils; + + clear() { + this.#mTIPWrapper?.clearFocusBlurNotifications(); + this.#mTIPWrapper = null; + } + + #flushPendingIMENotifications() { + return new Promise(resolve => + this.#mWindow.requestAnimationFrame(() => + this.#mWindow.requestAnimationFrame(resolve) + ) + ); + } + + #getExpectedIMEState() { + // Although if this.#mFocusElement is a