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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml

Issue 1988983002: Move the dom directory from web-platform-tests/ to wpt/. (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/dom/nodes/Document-getElementsByTagName-xhtml.xhtml
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml
deleted file mode 100644
index a094bd229ba2a4a03a6643ce2476733210221587..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Document.getElementsByTagName</title>
-<script src="../../../../resources/testharness.js"></script>
-<script src="../../../../resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<pre id="x"></pre>
-<script>
-test(function() {
- var t = document.body.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "I"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_equals(t.localName, "I")
- assert_equals(t.tagName, "I")
- assert_array_equals(document.getElementsByTagName("I"), [t])
- assert_array_equals(document.getElementsByTagName("i"), [])
- assert_array_equals(document.body.getElementsByTagName("I"), [t])
- assert_array_equals(document.body.getElementsByTagName("i"), [])
-}, "HTML element with uppercase tag name matches in XHTML documents")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "st"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("st"), [t])
- assert_array_equals(document.getElementsByTagName("ST"), [])
-}, "Element in non-HTML namespace, no prefix, lowercase name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "ST"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("ST"), [t])
- assert_array_equals(document.getElementsByTagName("st"), [])
-}, "Element in non-HTML namespace, no prefix, uppercase name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "te:st"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("st"), [])
- assert_array_equals(document.getElementsByTagName("ST"), [])
- assert_array_equals(document.getElementsByTagName("te:st"), [t])
- assert_array_equals(document.getElementsByTagName("te:ST"), [])
-}, "Element in non-HTML namespace, prefix, lowercase name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "te:ST"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("ST"), [])
- assert_array_equals(document.getElementsByTagName("st"), [])
- assert_array_equals(document.getElementsByTagName("te:st"), [])
- assert_array_equals(document.getElementsByTagName("te:ST"), [t])
-}, "Element in non-HTML namespace, prefix, uppercase name")
-
-test(function() {
- var t = document.body.appendChild(document.createElement("AÇ"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("AÇ"), [t], "All uppercase input")
- assert_array_equals(document.getElementsByTagName("aÇ"), [], "Ascii lowercase input")
- assert_array_equals(document.getElementsByTagName("aç"), [], "All lowercase input")
-}, "Element in HTML namespace, no prefix, non-ascii characters in name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "AÇ"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("AÇ"), [t], "All uppercase input")
- assert_array_equals(document.getElementsByTagName("aÇ"), [], "Ascii lowercase input")
- assert_array_equals(document.getElementsByTagName("aç"), [], "All lowercase input")
-}, "Element in non-HTML namespace, non-ascii characters in name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "test:aÇ"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("AÇ"), [], "All uppercase input")
- assert_array_equals(document.getElementsByTagName("aÇ"), [t], "Ascii lowercase input")
- assert_array_equals(document.getElementsByTagName("aç"), [], "All lowercase input")
-}, "Element in HTML namespace, prefix, non-ascii characters in name")
-
-test(function() {
- var t = document.body.appendChild(document.createElementNS("test", "test:AÇ"))
- this.add_cleanup(function() {document.body.removeChild(t)})
- assert_array_equals(document.getElementsByTagName("AÇ"), [t], "All uppercase input")
- assert_array_equals(document.getElementsByTagName("aÇ"), [], "Ascii lowercase input")
- assert_array_equals(document.getElementsByTagName("aç"), [], "All lowercase input")
-}, "Element in non-HTML namespace, prefix, non-ascii characters in name")
-
-test(function() {
- var actual = document.getElementsByTagName("*");
- var expected = [];
- var get_elements = function(node) {
- for (var i = 0; i &lt; node.childNodes.length; i++) {
- var child = node.childNodes[i];
- if (child.nodeType === child.ELEMENT_NODE) {
- expected.push(child);
- get_elements(child);
- }
- }
- }
- get_elements(document);
- assert_array_equals(actual, expected);
-}, "getElementsByTagName('*')")
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698