Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / tests / test_ime_state_in_text_control_on_reframe_in_parent.html
blobab388062619753945cd094c5f142312529048409
1 <html>
2 <head>
3 <title>Test for IME state of contenteditable on readonly state change</title>
4 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
5 <script src="file_ime_state_test_helper.js"></script>
6 <script src="file_test_ime_state_in_text_control_on_reframe.js"></script>
7 <link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css">
8 </head>
9 <script>
10 "use strict";
12 /* import-globals-from file_ime_state_test_helper.js */
13 /* import-globals-from file_test_ime_state_in_text_control_on_reframe.js */
15 SimpleTest.waitForExplicitFinish();
16 SimpleTest.waitForFocus(async () => {
17 const tipWrapper = new TIPWrapper(window);
18 const tester = new IMEStateInTextControlOnReframeTester();
19 for (let index = 0;
20 index < IMEStateInTextControlOnReframeTester.numberOfTextControlTypes;
21 index++) {
22 tipWrapper.clearFocusBlurNotifications();
23 const expectedData1 = await tester.prepareToRun(index, document);
24 tipWrapper.typeA();
25 await new Promise(resolve => requestAnimationFrame(
26 () => requestAnimationFrame(resolve)
27 )); // Flush IME content observer notifications.
28 tester.checkResultAfterTypingA(expectedData1, window, tipWrapper);
30 const expectedData2 = await tester.prepareToRun2(index, document);
31 tipWrapper.typeA();
32 await new Promise(resolve => requestAnimationFrame(
33 () => requestAnimationFrame(resolve)
34 )); // Flush IME content observer notifications.
35 tester.checkResultAfterTypingA2(expectedData2);
38 SimpleTest.finish();
39 });
40 </script>
41 <body></body>
42 </html>