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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.html b/third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.html
new file mode 100644
index 0000000000000000000000000000000000000000..6ded0ff12dcde623f7048586c354ccf77e6d983b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+<form method="get">
+<input name="y" type="checkbox" checked />
+<input name="y" type ="radio" checked />
+<input id="c1" name="y" type="checkbox" />
+<input id="r1" name="y" type="radio" />
+<input id="c2" name="n" type="checkbox" />
+<input id="r2" name="n" type="radio" />
+<input name="n" type="checkbox" />
+<input name="n" type="radio" />
+<input name="n" type="text" checked />
+<input name="n" type="password" checked />
+<input name="n" type="button" checked />
+<input name="n" type="file" checked />
+<input name="n" type="reset" checked />
+<input name="n" type="search" checked />
+<input name="n" type="email" checked />
+<input name="n" type="url" checked />
+<input name="n" type="tel" checked />
+<input name="n" type="number" checked />
+<input name="n" type="range" checked />
+<input name="n" type="date" checked />
+<input name="n" type="month" checked />
+<input name="n" type="week" checked />
+<input name="n" type="time" checked />
+<input name="n" type="date-time" checked />
+<input name="n" type="datetime-local" checked />
+<input name="n" type="color" checked />
+</form>
+<script>
+test(function() {
+ document.getElementById("c1").defaultChecked = true;
+ document.getElementById("r1").defaultChecked = true;
+ document.getElementById("c2").checked = true;
+ document.getElementById("r2").checked = true;
+ u = document.getElementsByName("n");
+ for (i = 0; i < u.length; i++)
+ assert_false(u[i].matches(":default"));
+ v = document.getElementsByName("y");
+ for (i = 0; i < v.length; i++)
+ assert_true(v[i].matches(":default"));
+}, "This test performs a check for the input types which are checkable having checked attribute to be considered for :default CSS selector.");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698