| Index: LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html
|
| diff --git a/LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html b/LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3225911c370f57710eaccd48ee746dc86a05ad44
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html
|
| @@ -0,0 +1,47 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script>
|
| +var expectedSelectedIndex;
|
| +
|
| +function recordIt()
|
| +{
|
| + var res = document.getElementById("res");
|
| + if (res.innerText != "FAIL")
|
| + res.innerText = "PASS";
|
| +}
|
| +
|
| +function testIt(ch, expected)
|
| +{
|
| + document.getElementById("sel").focus();
|
| + eventSender.keyDown(ch);
|
| + if (document.getElementById("sel").selectedIndex != expected)
|
| + document.getElementById("res").innerText = "FAIL";
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + if (!window.testRunner)
|
| + return;
|
| +
|
| + testRunner.dumpAsText();
|
| + testIt("downArrow", 1);
|
| + testIt("downArrow", 2);
|
| + testIt("a", 0);
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="test()">
|
| +<h1>Verify type ahead selection fires onchange event.</h1>
|
| +<ol>
|
| +<li>Set focus to select element</li>
|
| +<li>Type down arrow twice and type "a"</li>
|
| +<li>You see "apple" in select element and "PASS" below select element.</li>
|
| +</ol>
|
| +<select id="sel" onchange="recordIt()">
|
| + <option>apple</option>
|
| + <option>banana</option>
|
| + <option>cherry</option>
|
| +</select><br />
|
| +<div id="res"></div>
|
| +</html>
|
|
|