1 Check if :valid/:invalid CSS pseudo selectors are lively applied for forms
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Removing and adding required text inputs and modifying their value by a DOM tree mutation:
7 PASS backgroundOf(form1) is invalidColor
8 PASS backgroundOf(sub1) is subInvalidColor
9 PASS form1.removeChild(input1); backgroundOf(form1) is validColor
10 PASS backgroundOf(sub1) is subValidColor
11 PASS form1.appendChild(input1); backgroundOf(form1) is invalidColor
12 PASS backgroundOf(sub1) is subInvalidColor
13 PASS input1.setAttribute("value", "a"); backgroundOf(form1) is validColor
14 PASS backgroundOf(sub1) is subValidColor
15 PASS input2.setAttribute("value", ""); backgroundOf(form1) is invalidColor
16 PASS backgroundOf(sub1) is subInvalidColor
18 Disabling and marking inputs readonly by a DOM tree mutation:
19 PASS backgroundOf(form1) is invalidColor
20 PASS backgroundOf(sub1) is subInvalidColor
21 PASS input1.disabled=1; backgroundOf(form1) is validColor
22 PASS backgroundOf(sub1) is subValidColor
23 PASS input1.disabled=0; backgroundOf(form1) is invalidColor
24 PASS backgroundOf(sub1) is subInvalidColor
25 PASS input1.setAttribute("readonly", "1"); backgroundOf(form1) is validColor
26 PASS backgroundOf(sub1) is subValidColor
28 Move element under datalist by a DOM tree mutation:
29 PASS backgroundOf(form1) is invalidColor
30 PASS parent.removeChild(input1); backgroundOf(form1) is validColor
31 PASS dl1.appendChild(input1); backgroundOf(form1) is validColor
32 PASS parent.appendChild(input1); backgroundOf(form1) is invalidColor
34 Adding a required text input that is not a direct child of the form:
35 PASS backgroundOf(form1) is validColor
36 PASS div1.appendChild(input1); backgroundOf(form1) is invalidColor
38 Render multiple forms and reassign an invalid input from one to another:
39 PASS backgroundOf($("form1")) is invalidColor
40 PASS backgroundOf($("form2")) is validColor
41 PASS backgroundOf($("form3")) is validColor
42 PASS backgroundOf($("form1")) is validColor
43 PASS backgroundOf($("form3")) is invalidColor
45 Ensure that invalid event was not triggered on style evaluation:
46 PASS backgroundOf(form1) is invalidColor
48 PASS form1.checkValidity(); val is "1"
50 PASS successfullyParsed is true