summaryrefslogtreecommitdiffstats
path: root/widget/tests/test_ime_state_on_readonly_change_in_parent.html
blob: 055785654247055ee930dfe58e54e61d840e1ca9 (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
<html>
<head>
  <title>Test for IME state 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_on_readonly_change.js"></script>
  <link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script>
"use strict";

/* import-globals-from file_ime_state_test_helper.js */
/* import-globals-from file_test_ime_state_on_readonly_change.js */

SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(async () => {
  const tipWrapper = new TIPWrapper(window);
  const tester = new IMEStateOnReadonlyChangeTester();
  for (let i = 0; i < IMEStateOnReadonlyChangeTester.numberOfTextControlTypes; i++) {
    tester.checkBeforeRun(await tester.prepareToRun(i, window, document.body), tipWrapper);
    tester.checkResultOfMakingTextControlReadonly(await tester.runToMakeTextControlReadonly());
    tester.checkResultOfMakingTextControlEditable(await tester.runToMakeTextControlEditable());
    tipWrapper.clearFocusBlurNotifications();
    tester.clear();
  }
  SimpleTest.finish();
});
</script>
</head>
<body>
</body>
</html>