Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html b/third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..745555fb50fb1874162c34df97c30934d376f063 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style> |
|
tkent
2016/03/04 06:39:14
Remove this STYLE element.
ramya.v
2016/03/04 10:22:40
Done.
|
| + option:default { background: lime; } |
| + option { background: red; } |
| +</style> |
| +</head> |
| +<body> |
| +<form method="get"> |
| +<select> |
| +<option name="n">1</option> |
| +<option name="y" selected>2</option> |
| +<option id="o1" name="y">3</option> |
| +</select> |
| +</form> |
| +<script> |
| +test(function() { |
| + document.getElementById("o1").selected = true; |
| + u = document.getElementsByName("n"); |
| + for (i = 0; i < u.length; i++) |
| + assert_false(u[i].matches(':default')); |
|
tkent
2016/03/04 06:39:14
wrong indentation.
ramya.v
2016/03/04 10:22:40
Done.
|
| + v = document.getElementsByName("y"); |
| + for (i = 0; i < v.length; i++) |
| + assert_true(v[i].matches(':default')); |
|
tkent
2016/03/04 06:39:14
wrong indentation
ramya.v
2016/03/04 10:22:40
Done.
|
| +}, "This test performs a check for option elements having selected attribute to be considered for :default CSS selector."); |
| +</script> |
| +</body> |
| +</html> |