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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html

Issue 1756483005: Option, checkbox and radio should support ':default' selector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <form method="get">
9 <select>
10 <option name="n">1</option>
11 <option name="y" selected>2</option>
12 <option id="o1" name="y">3</option>
13 <option id="o2" name="n">4</option>
14 </select>
15 </form>
16 <script>
17 test(function() {
18 document.getElementById("o1").defaultSelected = true;
19 document.getElementById("o2").selected = true;
20 u = document.getElementsByName("n");
21 for (i = 0; i < u.length; i++)
22 assert_false(u[i].matches(":default"));
23 v = document.getElementsByName("y");
24 for (i = 0; i < v.length; i++)
25 assert_true(v[i].matches(":default"));
26 }, "This test performs a check for option elements having selected attribute to be considered for :default CSS selector.");
27 </script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698