Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate.html

Issue 1144143009: W3C Test: Import web-platform-tests/html/semantics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset=utf-8>
3 <title>Selector: pseudo-classes (:indeterminate)</title>
4 <link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org" id=link1>
5 <link rel=help href="https://html.spec.whatwg.org/multipage/#pseudo-classes" id= link2>
6 <script src="../../../../../../resources/testharness.js"></script>
7 <script src="../../../../../../resources/testharnessreport.js"></script>
8 <script src="utils.js"></script>
9 <div id="log"></div>
10 <input type=checkbox id=checkbox1>
11 <input type=checkbox id=checkbox2>
12 <input type=radio id=radio1 checked>
13 <input type=radio name=radiogroup id=radio2>
14 <input type=radio name=radiogroup id=radio3>
15 <input type=radio name=group2 id=radio4>
16 <input type=radio name=group2 id=radio5>
17 <progress id="progress1"></progress>
18 <progress id="progress2" value=10></progress>
19
20 <script>
21 testSelector(":indeterminate", ["radio2", "radio3", "radio4", "radio5", "progr ess1"], "':progress' matches <input>s radio buttons whose radio button group con tains no checked input and <progress> elements without value attribute");
22
23 document.getElementById("radio2").setAttribute("checked", "checked");
24 testSelector(":indeterminate", ["radio4", "radio5", "progress1"], "dynamically check a radio input in a radio button group");
25
26 document.getElementById("radio4").click();
27 testSelector(":indeterminate", ["checkbox1", "progress2"], "click on radio4 wh ich is in the indeterminate state");
28
29 document.getElementById("progress1").setAttribute("value", "20");
30 testSelector(":indeterminate", [], "adding a value to progress1 should put it in a determinate state");
31
32 document.getElementById("progress2").removeAttribute("value");
33 testSelector(":indeterminate", ["progress2"], "removing progress2's value shou ld put it in an indeterminate state");
34
35 document.getElementById("checkbox1").indeterminate = true; // set checkbox1 in the indeterminate state
36 testSelector(":indeterminate", ["checkbox1", "progress2"], "':progress' also m atches <input> checkbox whose indeterminate IDL is set to true");
37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698