| Index: third_party/WebKit/LayoutTests/fast/forms/select/option-dirtiness.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/option-dirtiness.html b/third_party/WebKit/LayoutTests/fast/forms/select/option-dirtiness.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3b8040228c8e51c3c0dc017a82394661ca5d1bf2
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/forms/select/option-dirtiness.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<body>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<div id="log"></div>
|
| +<select>
|
| +<option>Unselected</option>
|
| +<option selected>Selected</option>
|
| +</option>
|
| +</select>
|
| +<select>
|
| +<option>Unselected</option>
|
| +<option selected>Selected</option>
|
| +</option>
|
| +</select>
|
| +<script>
|
| +// This is a supplemenetal test for web-platform-tests/html/semantics/forms/the-option-element/option-selected.html
|
| +
|
| +test(function() {
|
| + var unselected = document.querySelectorAll('select')[0].options[0];
|
| + unselected.selected = false;
|
| + unselected.setAttribute('selected', 'selected');
|
| + assert_true(unselected.selected);
|
| +
|
| + var selected = document.querySelectorAll('select')[1].options[1];
|
| + selected.selected = true;
|
| + selected.removeAttribute('selected');
|
| + assert_false(selected.selected);
|
| +}, '|selected| setter should not make an option dirty if it doesn\'t change its selectedness and the option is owned by a select element');
|
| +</script>
|
| +</body>
|
|
|