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