diff options
author | Alexandrov Sergey <splavgm@gmail.com> | 2016-08-30 17:25:58 +0300 |
---|---|---|
committer | Alexandrov Sergey <splavgm@gmail.com> | 2016-08-30 17:30:06 +0300 |
commit | e4006fa9dd1a2d2b33f662bc15aae5079d97a581 (patch) | |
tree | 81c9d4305b71d318f579e5060916ba212278ddba | |
parent | f5dbf4184117b03451a8dd0fce08dd0e3ff227ac (diff) | |
download | servo-e4006fa9dd1a2d2b33f662bc15aae5079d97a581.tar.gz servo-e4006fa9dd1a2d2b33f662bc15aae5079d97a581.zip |
add HTMLOptionElement form attribute test
-rw-r--r-- | tests/wpt/metadata/MANIFEST.json | 6 | ||||
-rw-r--r-- | tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-form.html | 32 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 6c9c977a95b..7bbdda39bc3 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -37215,6 +37215,12 @@ "deleted_reftests": {}, "items": { "testharness": { + "html/semantics/forms/the-option-element/option-form.html": [ + { + "path": "html/semantics/forms/the-option-element/option-form.html", + "url": "/html/semantics/forms/the-option-element/option-form.html" + } + ], "html/semantics/interactive-elements/the-dialog-element/dialog-open.html": [ { "path": "html/semantics/interactive-elements/the-dialog-element/dialog-open.html", diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-form.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-form.html new file mode 100644 index 00000000000..1a68b5c1ca8 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-option-element/option-form.html @@ -0,0 +1,32 @@ +<!doctype html> +<meta charset=utf-8> +<title>HTMLOptionElement.form</title> +<link rel=author title="Sergey Alexandrov" href="mailto:splavgm@gmail.com"> +<link rel=help href="https://html.spec.whatwg.org/multipage/#dom-option-form"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<form id="form"> + <select id="select"> + <optgroup id="optgroup"></optgroup> + </select> +</form> +<div id=log></div> + +<script> +test(function () { + var form = document.getElementById("form"); + var select = document.getElementById("select"); + var optgroup = document.getElementById("optgroup"); + + var o1 = document.createElement("option"); + assert_equals(o1.form, null); + + select.appendChild(o1); + assert_equals(o1.form, select.form); + + var o2 = document.createElement("option"); + select.appendChild(o2); + assert_equals(o2.form, select.form); + +}, "form"); +</script> |