| Index: LayoutTests/dart/Node.html
|
| diff --git a/LayoutTests/dart/Node.html b/LayoutTests/dart/Node.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4dbde2b8dad62fa925a0884b76563e4d91ab6d2b
|
| --- /dev/null
|
| +++ b/LayoutTests/dart/Node.html
|
| @@ -0,0 +1,58 @@
|
| +<html>
|
| +<body>
|
| +
|
| +<div id="insert">*Insert Test Parent*<div id="refChild">Reference Child</div></div>
|
| +<div id="replace">*Replace Test Parent*<div id="oldChild">Old Child</div></div>
|
| +<div id="remove">*Remove Test Parent*<div id="child">Child</div></div>
|
| +<div id="append">*Append Test Parent*</div>
|
| +
|
| +<script id="dart" type="application/dart">
|
| +import 'dart:html';
|
| +
|
| +class NodeTest {
|
| + void testInsertBefore() {
|
| + Element parent = document.query('#insert');
|
| + Element child = new Element.tag('div');
|
| + child.innerHtml = 'Inserted Child';
|
| + Element refChild = document.query('#refChild');
|
| + parent.insertBefore(child, refChild);
|
| + }
|
| +
|
| + void testReplaceChild() {
|
| + Element parent = document.query('#replace');
|
| + Element child = new Element.tag('div');
|
| + child.innerHtml = 'New Child';
|
| + Element oldChild = document.query('#oldChild');
|
| + oldChild.replaceWith(child);
|
| + }
|
| +
|
| + void testRemoveChild() {
|
| + Element parent = document.query('#remove');
|
| + Element child = document.query('#child');
|
| + child.remove();
|
| + }
|
| +
|
| + void testAppendChild() {
|
| + Element parent = document.query('#append');
|
| + Element child = new Element.tag('div');
|
| + child.innerHtml = 'Appended Child';
|
| + parent.nodes.add(child);
|
| + }
|
| +}
|
| +
|
| +void main() {
|
| + NodeTest tester = new NodeTest();
|
| + tester.testInsertBefore();
|
| + tester.testReplaceChild();
|
| + tester.testRemoveChild();
|
| + tester.testAppendChild();
|
| +}
|
| +</script>
|
| +
|
| +<script>
|
| + if (window.testRunner)
|
| + window.testRunner.dumpAsText();
|
| +</script>
|
| +
|
| +</body>
|
| +</html>
|
|
|