summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html')
-rw-r--r--layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html112
1 files changed, 112 insertions, 0 deletions
diff --git a/layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html b/layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html
new file mode 100644
index 0000000000..4130241765
--- /dev/null
+++ b/layout/reftests/forms/select/out-of-bounds-selectedindex-ref.html
@@ -0,0 +1,112 @@
+<html class="reftest-wait">
+<head><title>Testcase for bug 471741</title>
+<script>
+function sel(id,index) {
+ var el = document.getElementById(id)
+ el.selectedIndex = index;
+}
+
+</script>
+</head>
+<body>
+<select size="4" id="m1" multiple="multiple">
+ <option value="Item0">Item0</option>
+ <option selected="selected" value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+<select size="1" id="s1">
+ <option value="Item0">Item0</option>
+ <option selected="selected" value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+
+<select size="4" id="m2" multiple="multiple">
+ <option value="Item0">Item0</option>
+</select>
+<select size="1" id="s2">
+ <option value="Item0">Item0</option>
+</select>
+
+<select size="4" id="m3" multiple="multiple"></select>
+<select size="1" id="s3"></select>
+<br>
+
+<select size="4" id="r2m1" multiple="multiple">
+ <option value="Item0">Item0</option>
+ <option selected="selected" value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+<select size="1" id="r2s1">
+ <option value="Item0">Item0</option>
+ <option selected="selected" value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+
+<select size="4" id="r2m2" multiple="multiple">
+ <option value="Item0">Item0</option>
+</select>
+<select size="1" id="r2s2">
+ <option value="Item0">Item0</option>
+</select>
+
+<select size="4" id="r2m3" multiple="multiple"></select>
+<select size="1" id="r2s3"></select>
+<br>
+
+<select size="4" id="r3m1" multiple="multiple">
+ <option selected="selected" value="Item0">Item0</option>
+ <option value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+<select size="1" id="r3s1">
+ <option selected="selected" value="Item0">Item0</option>
+ <option value="Item1">Item1</option>
+ <option value="Item2">Item2</option>
+ <option value="Item3">Item3</option>
+ <option value="Item4">Item4</option>
+</select>
+
+<select size="4" id="r3m2" multiple="multiple">
+ <option selected="selected" value="Item0">Item0</option>
+</select>
+<select size="1" id="r3s2">
+ <option selected="selected" value="Item0">Item0</option>
+</select>
+
+<select size="4" id="r3m3" multiple="multiple"></select>
+<select size="1" id="r3s3"></select>
+<br>
+
+<div id="result">Result: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 -1 -1 </div>
+
+<script>
+sel('m1', -1)
+sel('s1', -1)
+sel('m2', -1)
+sel('s2', -1)
+sel('m3', -1)
+sel('s3', -1)
+
+sel('r2m1', -1)
+sel('r2s1', -1)
+sel('r2m2', -1)
+sel('r2s2', -1)
+sel('r2m3', -1)
+sel('r2s3', -1)
+
+var flush = document.documentElement.offsetHeight;
+document.documentElement.className='';
+
+</script>
+</body>
+</html>