diff options
Diffstat (limited to '')
-rw-r--r-- | widget/tests/test_ime_state_in_text_control_on_reframe_in_parent.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/widget/tests/test_ime_state_in_text_control_on_reframe_in_parent.html b/widget/tests/test_ime_state_in_text_control_on_reframe_in_parent.html new file mode 100644 index 0000000000..ab38806261 --- /dev/null +++ b/widget/tests/test_ime_state_in_text_control_on_reframe_in_parent.html @@ -0,0 +1,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> |