Index: LayoutTests/fast/dom/HTMLOptionElement/option-constructor.html |
diff --git a/LayoutTests/fast/dom/HTMLOptionElement/option-constructor.html b/LayoutTests/fast/dom/HTMLOptionElement/option-constructor.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fdc15f43d1422b83d74f9f096b0d09e3d44df38c |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLOptionElement/option-constructor.html |
@@ -0,0 +1,19 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/js-test.js"></script> |
philipj_slow
2015/06/24 09:08:56
I think some of the existing tests should cover th
shiva.jm
2015/06/25 05:51:06
Done.
|
+ |
+<script> |
+description('Tests the HTMLOptionElement constructor.'); |
+ |
+var select; |
+ |
+select = document.createElement('select'); |
+select.appendChild(new Option('a', 'a')); |
+select.appendChild(new Option('b', 'b', true, true)); |
+ |
+shouldBeFalse('select.options[0].selected'); |
+shouldBeFalse('select.options[0].defaultSelected'); |
+ |
+shouldBeTrue('select.options[1].selected'); |
+shouldBeTrue('select.options[1].defaultSelected'); |
+ |
+</script> |