summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html')
-rw-r--r--testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html b/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html
new file mode 100644
index 0000000000..243067937c
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/forms/the-selectlist-element/selectlist-value-option.tentative.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<link rel=author href="mailto:jarhar@chromium.org">
+<link rel=help href="https://github.com/openui/open-ui/issues/664">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<selectlist id=selectlist>
+ <option id=optone>innertext one</option>
+ <option id=opttwo value=valueattribute>innertext two</option>
+</selectlist>
+
+<script>
+test(() => {
+ assert_equals(selectlist.value, 'innertext one',
+ 'The first option should be selected initially.');
+ selectlist.value = 'valueattribute';
+ assert_equals(selectlist.value, 'valueattribute',
+ 'Assigning value should look at the options value, not innertext');
+}, 'selectlist.value should reflect option.value');
+</script>