diff options
Diffstat (limited to 'testing/web-platform/tests/html/rendering/replaced-elements/the-option-element')
4 files changed, 83 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br-ref.html new file mode 100644 index 0000000000..954840f389 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>option element with br child</title> +<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#concept-option-label"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-option-text"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-select-element-2"> + +<p>This test passes if the option element displays three options:</p> + +<pre>a +b +ab</pre> + +<p>Importantly the third option must not be split across two lines.</p> + +<select multiple> + <option>a</option> + <option>b</option> + <option>ab</option> +</select> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br.html b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br.html new file mode 100644 index 0000000000..3b8d992cc2 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/option-with-br.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>option element with br child</title> +<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#concept-option-label"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-option-text"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-select-element-2"> + +<link rel="match" href="option-with-br-ref.html"> + +<p>This test passes if the option element displays three options:</p> + +<pre>a +b +ab</pre> + +<p>Importantly the third option must not be split across two lines.</p> + +<select multiple> + <option>a</option> + <option>b</option> + <option id="manipulate-me"></option> +</select> + +<script> +"use strict"; +const option = document.querySelector("#manipulate-me"); + +option.appendChild(document.createTextNode("a")); +option.appendChild(document.createElement("br")); +option.appendChild(document.createTextNode("b")); +</script> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos-ref.html b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos-ref.html new file mode 100644 index 0000000000..3cb496ea1b --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos-ref.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>Test reference</title> +<style> +.abspos { + position: absolute; + background-color: green; + height: 300px; + width: 300px; +} +</style> +<div class="abspos"></div> diff --git a/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos.html b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos.html new file mode 100644 index 0000000000..ed290250da --- /dev/null +++ b/testing/web-platform/tests/html/rendering/replaced-elements/the-option-element/select-multiple-covered-by-abspos.html @@ -0,0 +1,19 @@ +<!doctype html> +<meta charset="utf-8"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1770532"> +<link rel="author" href="mailto:dholbert@mozilla.com" title="Daniel Holbert"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="match" href="select-multiple-covered-by-abspos-ref.html"> +<title>Combobox selects are not stacking contexts by default</title> +<style> +.abspos { + position: absolute; + background-color: green; + height: 300px; + width: 300px; +} +</style> +<div class="abspos"></div> +<select multiple> + <option>This text shouldn't be visible.</option> +</select> |