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">
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();
20 index
< IMEStateInTextControlOnReframeTester
.numberOfTextControlTypes
;
22 tipWrapper
.clearFocusBlurNotifications();
23 const expectedData1
= await tester
.prepareToRun(index
, document
);
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
);
32 await
new Promise(resolve
=> requestAnimationFrame(
33 () => requestAnimationFrame(resolve
)
34 )); // Flush IME content observer notifications.
35 tester
.checkResultAfterTypingA2(expectedData2
);