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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/select-script-onchange.html

Issue 1509853008: Move select/option/optgroup-related tests in fast/forms to fast/forms/select. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: third_party/WebKit/LayoutTests/fast/forms/select-script-onchange.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select-script-onchange.html b/third_party/WebKit/LayoutTests/fast/forms/select-script-onchange.html
deleted file mode 100644
index e7645874d1281d65f41d9d92c13e53e39b01cb24..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/forms/select-script-onchange.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<html>
- <head>
- <title></title>
- <script type="text/javascript">
- var changeCount = new Array(4);
- changeCount[1] = changeCount[2] = changeCount[3] = 0;
-
- function test()
- {
- if (!window.eventSender)
- return;
-
- testRunner.dumpAsText();
-
- var popup = document.getElementById("switcher1");
- popup.focus();
-
- popup = document.getElementById("switcher2");
- popup.focus();
-
- eventSender.keyDown("t", null);
- eventSender.keyDown("\r", null);
-
- var popup = document.getElementById("switcher3");
- popup.focus();
-
- check();
- }
-
- function check() {
- setTimeout("document.getElementById('switcher3').selectedIndex = 1;", 0);
-
- var popup = document.getElementById("switcher2");
- popup.focus();
-
- var result = document.getElementById("result");
- result.innerHTML = "";
- if (changeCount[1] != 0) {
- result.innerHTML += "<br/>FAILURE: onchange(1) called " + changeCount[1] + " times.";
- }
- if (changeCount[2] != 1) {
- result.innerHTML += "<br/>FAILURE: onchange(2) called " + changeCount[2] + " times.";
- }
- if (changeCount[3] != 0) {
- result.innerHTML += "<br/>FAILURE: onchange(3) called " + changeCount[3] + " times.";
- }
- if (result.innerHTML == "") result.innerHTML = "SUCCESS";
-
- }
-
- function changed(select)
- {
- changeCount[select]++;
- }
- </script>
- </head>
- <body onload="test()">
- <p>
- Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=23721">http://bugs.webkit.org/show_bug.cgi?id=23721</a>
- Changing dropdown's selectedIndex within onchange handler fires another onchange</i>.
- </p>
- <p id="result">
- To test interactively: focus on the first select (don't change it).<br/>
- Change the second select to "two"<br/>
- Focus on the third, then click <a href="#" onclick="check(); return false;">here</a>.
- </p>
- This select changes on focus: should not fire onchange.
- <select name="switcher1" id="switcher1" onfocus="this.selectedIndex = 1;" onchange="changed(1)">
- <option value="one">One</option>
- <option value="two">Two</option>
- </select>
- <hr/>
- This select changes on change: should only fire onchange once.
- <select name="switcher2" id="switcher2" onchange="changed(2); if (this.selectedIndex == 1) this.selectedIndex = 2;">
- <option value="one">One</option>
- <option value="two">Two</option>
- <option value="three">Three</option>
- </select>
- <hr/>
- This select is changed by a timeout in the test script. It should not fire onchange.
- <select name="switcher3" id="switcher3" onchange="changed(3)">
- <option value="one">One</option>
- <option value="two">Two</option>
- </select>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698