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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Document-adoptNode.html

Issue 2020943002: update-w3c-deps: Do not modify testharness tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>Document.adoptNode</title> 3 <title>Document.adoptNode</title>
4 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-adoptnode"> 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-document-adoptnode">
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <div id="log"></div> 7 <div id="log"></div>
8 <!-- creates an element with local name "x<": --><x<>x</x<> 8 <!--creates an element with local name "x<": --><x<>x</x<>
9 <script> 9 <script>
10 test(function() { 10 test(function() {
11 var y = document.getElementsByTagName("x<")[0] 11 var y = document.getElementsByTagName("x<")[0]
12 var child = y.firstChild 12 var child = y.firstChild
13 assert_equals(y.parentNode, document.body) 13 assert_equals(y.parentNode, document.body)
14 assert_equals(y.ownerDocument, document) 14 assert_equals(y.ownerDocument, document)
15 assert_equals(document.adoptNode(y), y) 15 assert_equals(document.adoptNode(y), y)
16 assert_equals(y.parentNode, null) 16 assert_equals(y.parentNode, null)
17 assert_equals(y.firstChild, child) 17 assert_equals(y.firstChild, child)
18 assert_equals(y.ownerDocument, document) 18 assert_equals(y.ownerDocument, document)
(...skipping 22 matching lines...) Expand all
41 assert_equals(document.adoptNode(doctype), doctype) 41 assert_equals(document.adoptNode(doctype), doctype)
42 assert_equals(doctype.parentNode, null) 42 assert_equals(doctype.parentNode, null)
43 assert_equals(doctype.ownerDocument, document) 43 assert_equals(doctype.ownerDocument, document)
44 }, "Explicitly adopting a DocumentType should work.") 44 }, "Explicitly adopting a DocumentType should work.")
45 45
46 test(function() { 46 test(function() {
47 var doc = document.implementation.createDocument(null, null, null) 47 var doc = document.implementation.createDocument(null, null, null)
48 assert_throws("NOT_SUPPORTED_ERR", function() { document.adoptNode(doc) }) 48 assert_throws("NOT_SUPPORTED_ERR", function() { document.adoptNode(doc) })
49 }, "Adopting a Document should throw.") 49 }, "Adopting a Document should throw.")
50 </script> 50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698