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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/default.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 (:default)</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 <form>
11 <button id=button1 type=button>button1</button>
12 <button id=button2 type=submit>button2</button>
13 </form>
14 <form>
15 <button id=button3 type=reset>button3</button>
16 <button id=button4>button4</button>
17 </form>
18 <button id=button5 type=submit>button5</button>
19 <form id=form1>
20 <input type=text id=input1>
21 </form>
22 <input type=text id=input2 form=form1>
23 <form>
24 <input type=submit id=input3>
25 <input type=submit id=input4>
26 </form>
27 <form>
28 <input type=image id=input5>
29 <input type=image id=input6>
30 </form>
31 <form>
32 <input type=submit id=input7>
33 </form>
34 <input type=checkbox id=checkbox1 checked>
35 <input type=checkbox id=checkbox2>
36 <input type=checkbox id=checkbox3 default>
37 <select id=select1>
38 <optgroup label="options" id=optgroup1>
39 <option value="option1" id=option1 selected>option1
40 <option value="option1" id=option1>option1
41 </select>
42 <dialog id="dialog">
43 <input type=submit id=input8>
44 </dialog>
45 <form>
46 <button id=button6 type='invalid'>button6</button>
47 <button id=button7>button7</button>
48 </form>
49 <form>
50 <button id=button8>button8</button>
51 <button id=button9>button9</button>
52 </form>
53
54
55 <script>
56 testSelector(":default", ["button2", "button4", "input3", "input5", "input7", "checkbox1", "option1", "button6", "button8"], "':default' matches <button>s tha t are their form's default button, <input>s of type submit/image that are their form's default button, checked <input>s and selected <option>s");
57
58 document.getElementById("button1").type = "submit"; // change the form's defau lt button
59 testSelector(":default", ["button1", "button4", "input3", "input5", "input7", "checkbox1", "option1", "button6", "button8"], "':default' matches dynamically c hanged form's default buttons");
60
61 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698