Bug 1772588 [wpt PR 34302] - [wpt] Add test for block-in-inline offsetParent., a...
[gecko.git] / editor / libeditor / tests / test_state_change_on_reframe.html
blobc74bf46ea779221172645d6fa171b2ec60a533d3
1 <!doctype html>
2 <title>Test for state change not bogusly changing during reframe (bug 1528644)</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <script src="/tests/SimpleTest/EventUtils.js"></script>
5 <style>
6 .reframe { display: table }
7 input:invalid { color: red; }
8 input:valid { color: green; }
9 </style>
10 <form>
11 <input type="text" required minlength="4" onkeypress="this.classList.toggle('reframe')">
12 </form>
13 <script>
14 SimpleTest.waitForExplicitFinish();
15 SimpleTest.waitForFocus(function() {
16 let input = document.querySelector("input");
17 input.focus();
18 requestAnimationFrame(() => {
19 synthesizeKey("a");
20 requestAnimationFrame(() => {
21 requestAnimationFrame(() => {
22 ok(!input.validity.valid);
23 is(getComputedStyle(input).display, "table");
24 SimpleTest.finish();
25 });
26 });
27 });
28 });
29 </script>