mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Merge pull request #3133 from Ms2ger/rm-contenttests
Remove content tests that duplicate wpt tests; r=abinader
This commit is contained in:
commit
c6628120ee
7 changed files with 0 additions and 166 deletions
|
@ -1,31 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="harness.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var elem = document.createElement("p");
|
||||
is(elem.childNodes.length, 0);
|
||||
|
||||
var children = elem.childNodes;
|
||||
var child = document.createElement("p");
|
||||
elem.appendChild(child);
|
||||
|
||||
is(elem.childNodes.length, 1);
|
||||
is(elem.childNodes[0], child);
|
||||
|
||||
var child2 = document.createElement("p");
|
||||
elem.appendChild(child2);
|
||||
|
||||
is_in(1, children);
|
||||
is(children.length, 2);
|
||||
is(children.item(1), child2);
|
||||
|
||||
is_not_in(2, children);
|
||||
is(children.item(2), null);
|
||||
|
||||
finish();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script id="script">
|
||||
// test1: createElementNS
|
||||
{
|
||||
var htmlElt = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
||||
is_not(htmlElt, null, "test1-0: createElementNS");
|
||||
is_a(htmlElt, Element, "test1-1: createElementNS");
|
||||
is_a(htmlElt, HTMLElement, "test1-2: createElementNS");
|
||||
is_a(htmlElt, HTMLParagraphElement, "test1-3: createElementNS");
|
||||
is(htmlElt.namespaceURI, "http://www.w3.org/1999/xhtml", "test1-4: createElementNS");
|
||||
|
||||
var otherNsElt = document.createElementNS("http://www.example.org/dummy", "p");
|
||||
is_not(otherNsElt, null, "test1-5: createElementNS");
|
||||
is_a(otherNsElt, Element, "test1-6: createElementNS");
|
||||
is_not_a(otherNsElt, HTMLElement, "test1-7: createElementNS");
|
||||
is(otherNsElt.namespaceURI, "http://www.example.org/dummy", "test1-8: createElementNS");
|
||||
}
|
||||
// test2: Node.namespaceURI
|
||||
{
|
||||
is(document.namespaceURI, undefined, "test2.0: createElementNS");
|
||||
is(document.documentElement.namespaceURI, "http://www.w3.org/1999/xhtml", "test2.1: createElementNS");
|
||||
var scriptElt = document.getElementById("script");
|
||||
is(scriptElt.firstChild.namespaceURI, undefined, "test2.2: createElementNS");
|
||||
is(scriptElt.nextSibling.namespaceURI, undefined, "test2.3: createElementNS");
|
||||
}
|
||||
|
||||
finish();
|
||||
</script><!-- this is a comment -->
|
||||
</head>
|
||||
</html>
|
|
@ -1,18 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
// test1: createProcessingInstruction
|
||||
{
|
||||
var pi = document.createProcessingInstruction("xml-stylesheet", "href=\"mycss.css\" type=\"text/css\"");
|
||||
is_not(pi, null, "test1-0: createProcessingInstruction");
|
||||
is_a(pi, ProcessingInstruction, "test1-1: createProcessingInstruction");
|
||||
is(pi.target, "xml-stylesheet", "test1-2: createProcessingInstruction");
|
||||
is(pi.data, "href=\"mycss.css\" type=\"text/css\"", "test1-3: createProcessingInstruction");
|
||||
}
|
||||
|
||||
finish();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,24 +0,0 @@
|
|||
<!-- comment -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
// test1: document with doctype
|
||||
{
|
||||
is_not(document.doctype, document.firstChild, "test1-0, document with doctype");
|
||||
is_not(document.doctype, null, "test1-1, document with doctype");
|
||||
is_a(document.doctype, DocumentType, "test1-2, document with doctype");
|
||||
}
|
||||
|
||||
// test2: empty document
|
||||
{
|
||||
var newdoc = new Document();
|
||||
newdoc.appendChild(newdoc.createElement("html"));
|
||||
is(newdoc.doctype, null, "test2-0, empty document");
|
||||
}
|
||||
|
||||
finish();
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
|
@ -1,36 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
let doc = document.implementation.createHTMLDocument("title");
|
||||
is_not(doc, null);
|
||||
|
||||
let foo = document.getElementById("foo");
|
||||
is(foo.ownerDocument, document);
|
||||
|
||||
let imported_foo = doc.importNode(foo); // deep = false
|
||||
is(imported_foo.parentNode, null);
|
||||
is(imported_foo.ownerDocument, doc);
|
||||
is(imported_foo.childNodes.length, 0);
|
||||
|
||||
imported_foo = doc.importNode(foo, true);
|
||||
is(imported_foo.parentNode, null);
|
||||
is(imported_foo.ownerDocument, doc);
|
||||
is(imported_foo.childNodes.length, 1);
|
||||
|
||||
let bar = document.createElement("div");
|
||||
bar.appendChild(document.createElement("div"));
|
||||
|
||||
imported_bar = doc.importNode(bar, true);
|
||||
is(imported_bar.parentNode, null);
|
||||
is(imported_bar.ownerDocument, doc);
|
||||
is(imported_bar.childNodes.length, 1);
|
||||
|
||||
finish();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo"><div id="bar"></div></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
<!doctype html>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
should_throw(function() { document.createElement("1foo") });
|
||||
finish();
|
||||
</script>
|
|
@ -1,18 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<script>
|
||||
var elems = document.getElementsByTagName('div');
|
||||
is(elems.length, 2);
|
||||
let elem = elems[0];
|
||||
is(elem.nodeType, 1);
|
||||
is_a(elem, HTMLDivElement);
|
||||
is(elem.tagName, "DIV");
|
||||
finish();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div>div one</div>
|
||||
<div>div two</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue