Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: LayoutTests/fast/forms/select/menulist-type-ahead-find-original-item.html

Issue 1013303004: Fix issue on <select> style change when popup is visible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test expectation Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698