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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/add-remove-option-modification-event.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/add-remove-option-modification-event.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/add-remove-option-modification-event.html b/third_party/WebKit/LayoutTests/fast/forms/add-remove-option-modification-event.html
deleted file mode 100644
index e45735f03904b2c89bf4b2aa0b7addb8e61a0345..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/forms/add-remove-option-modification-event.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<p>Test that SELECT is in correct state when handling a DOM modification event for option removing.</p>
-<form>
-<select ><option selected>1</option><option>2</option></select>
-<select multiple><option selected>1</option><option selected>2</option></select>
-<select multiple></select>
-</form>
-<div id=res></div>
-<script>
- if (window.testRunner)
- testRunner.dumpAsText();
-
- function log(msg)
- {
- var r = document.getElementById('res');
- r.innerHTML = r.innerHTML + "<br>" + msg;
- }
-
- var theSelect;
-
- function testResults(expectedArr)
- {
- var resultsArr = new Array(theSelect.options.length);
-
- var i;
- for (i=0; i < theSelect.options.length; i++) {
- resultsArr[i] = theSelect.options[i].selected;
- }
- var successString = "Failed";
- var success = false;
- if (expectedArr.join() == resultsArr.join()) {
- success = true;
- successString = "Passed";
- }
-
- log(successString);
- if (!success) {
- log("<pre> Expected: " + expectedArr.join() + "<br>" + " Actual: " + resultsArr.join() + "</pre>");
- }
- }
-
- function subtreeModified()
- {
- testResults([true], theSelect);
- }
-
- function nodeInserted()
- {
- testResults([false], theSelect);
- }
-
- try {
- theSelect = document.forms[0].elements[0];
- theSelect.addEventListener("DOMSubtreeModified", subtreeModified, true);
- theSelect.remove(theSelect.options[0]);
-
- theSelect = document.forms[0].elements[1];
- theSelect.addEventListener("DOMSubtreeModified", subtreeModified, true);
- theSelect.remove(theSelect.options[0]);
-
- theSelect = document.forms[0].elements[2];
- theSelect.addEventListener("DOMNodeInserted", nodeInserted, true);
- theSelect.options.add(new Option("2", "2", false, false), 0);
-
- } catch (ex) {
- alert(ex);
- }
-</script>

Powered by Google App Engine
This is Rietveld 408576698