| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset=utf-8> | 4 <meta charset=utf-8> |
| 5 <title>Node.prototype.rootNode</title> | 5 <title>Node.prototype.rootNode</title> |
| 6 <link rel="help" href="https://dom.spec.whatwg.org/#dom-node-rootnode"> | 6 <link rel="help" href="https://dom.spec.whatwg.org/#dom-node-rootnode"> |
| 7 <script src="../../../../resources/testharness.js"></script> | 7 <script src="/resources/testharness.js"></script> |
| 8 <script src="../../../../resources/testharnessreport.js"></script> | 8 <script src="/resources/testharnessreport.js"></script> |
| 9 </head> | 9 </head> |
| 10 <body> | 10 <body> |
| 11 <script> | 11 <script> |
| 12 | 12 |
| 13 test(function () { | 13 test(function () { |
| 14 var element = document.createElement('div'); | 14 var element = document.createElement('div'); |
| 15 assert_equals(element.rootNode, element, 'rootNode on an element without a p
arent must return the element itself'); | 15 assert_equals(element.rootNode, element, 'rootNode on an element without a p
arent must return the element itself'); |
| 16 | 16 |
| 17 var text = document.createTextNode(''); | 17 var text = document.createTextNode(''); |
| 18 assert_equals(text.rootNode, text, 'rootNode on a text node without a parent
must return the text node itself'); | 18 assert_equals(text.rootNode, text, 'rootNode on a text node without a parent
must return the text node itself'); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 var processingInstruction = document.createProcessingInstruction('target', '
data'); | 74 var processingInstruction = document.createProcessingInstruction('target', '
data'); |
| 75 parent.appendChild(processingInstruction) | 75 parent.appendChild(processingInstruction) |
| 76 assert_equals(processingInstruction.rootNode, fragment, | 76 assert_equals(processingInstruction.rootNode, fragment, |
| 77 'rootNode on a processing instruction node inside a document fragment mu
st return the fragment'); | 77 'rootNode on a processing instruction node inside a document fragment mu
st return the fragment'); |
| 78 }, 'rootNode attribute must return a document fragment when a node is in the fra
gment'); | 78 }, 'rootNode attribute must return a document fragment when a node is in the fra
gment'); |
| 79 | 79 |
| 80 </script> | 80 </script> |
| 81 </body> | 81 </body> |
| 82 </html> | 82 </html> |
| OLD | NEW |