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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-remove.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-remove.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-remove.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-remove.html
deleted file mode 100644
index cdead1b9c47cbd7ce868bdbd1a4afe70f9a2d047..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/select-remove.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>HTMLSelectElement.remove</title>
-<link rel="author" title="Ms2ger" href="Ms2ger@gmail.com">
-<link rel="help" href="https://dom.spec.whatwg.org/#dom-childnode-remove">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-select-remove">
-<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-htmloptionscollection-remove">
-<script src="../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../resources/testharnessreport.js"></script>
-<div id=log></div>
-<script>
-function testRemove(getter, desc) {
- test(function() {
- var div = document.createElement("div");
- var select = document.createElement("select");
- div.appendChild(select);
- assert_equals(select.parentNode, div);
-
- var options = [];
- for (var i = 0; i < 3; ++i) {
- var option = document.createElement("option");
- option.textContent = String(i);
- select.appendChild(option);
- options.push(option);
- }
-
- getter(select).remove(-1);
- assert_array_equals(select.options, options, "After remove(-1)");
- assert_equals(select.parentNode, div);
-
- getter(select).remove(3);
- assert_array_equals(select.options, options, "After remove(3)");
- assert_equals(select.parentNode, div);
-
- getter(select).remove(0);
- assert_array_equals(select.options, [options[1], options[2]], "After remove(0)");
- assert_equals(select.parentNode, div);
- }, desc)
-}
-testRemove(function(select) { return select; }, "select.remove(n) should work");
-testRemove(function(select) { return select.options; }, "select.options.remove(n) should work");
-test(function() {
- var div = document.createElement("div");
- var select = document.createElement("select");
- div.appendChild(select);
- assert_equals(select.parentNode, div);
- assert_equals(div.firstChild, select);
-
- select.remove();
- assert_equals(select.parentNode, null);
- assert_equals(div.firstChild, null);
-}, "remove() should work on select elements.")
-test(function() {
- var div = document.createElement("div");
- var select = document.createElement("select");
- div.appendChild(select);
- assert_equals(select.parentNode, div);
- assert_equals(div.firstChild, select);
-
- Element.prototype.remove.call(select);
- assert_equals(select.parentNode, null);
- assert_equals(div.firstChild, null);
-}, "Element#remove() should work on select elements.")
-</script>

Powered by Google App Engine
This is Rietveld 408576698