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

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: Rebased the patch 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 <style>
tkent 2016/03/04 06:39:14 Remove this STYLE element.
ramya.v 2016/03/04 10:22:40 Done.
7 option:default { background: lime; }
8 option { background: red; }
9 </style>
10 </head>
11 <body>
12 <form method="get">
13 <select>
14 <option name="n">1</option>
15 <option name="y" selected>2</option>
16 <option id="o1" name="y">3</option>
17 </select>
18 </form>
19 <script>
20 test(function() {
21 document.getElementById("o1").selected = true;
22 u = document.getElementsByName("n");
23 for (i = 0; i < u.length; i++)
24 assert_false(u[i].matches(':default'));
tkent 2016/03/04 06:39:14 wrong indentation.
ramya.v 2016/03/04 10:22:40 Done.
25 v = document.getElementsByName("y");
26 for (i = 0; i < v.length; i++)
27 assert_true(v[i].matches(':default'));
tkent 2016/03/04 06:39:14 wrong indentation
ramya.v 2016/03/04 10:22:40 Done.
28 }, "This test performs a check for option elements having selected attribute to be considered for :default CSS selector.");
29 </script>
30 </body>
31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698