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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-parentElement.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 <title>Node.parentElement</title> 2 <title>Node.parentElement</title>
3 <link rel="stylesheet" href="../../../../resources/testharness.css">
4 <script src="../../../../resources/testharness.js"></script> 3 <script src="../../../../resources/testharness.js"></script>
5 <script src="../../../../resources/testharnessreport.js"></script> 4 <script src="../../../../resources/testharnessreport.js"></script>
6 <div id="log"></div> 5 <div id="log"></div>
7 <script> 6 <script>
8 test(function() { 7 test(function() {
9 assert_equals(document.parentElement, null) 8 assert_equals(document.parentElement, null)
10 }, "When the parent is null, parentElement should be null") 9 }, "When the parent is null, parentElement should be null")
11 test(function() { 10 test(function() {
12 assert_equals(document.doctype.parentElement, null) 11 assert_equals(document.doctype.parentElement, null)
13 }, "When the parent is a document, parentElement should be null (doctype)") 12 }, "When the parent is a document, parentElement should be null (doctype)")
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 document.body.appendChild(el) 73 document.body.appendChild(el)
75 assert_equals(el.parentElement, document.body) 74 assert_equals(el.parentElement, document.body)
76 }, "parentElement should work correctly in a document (element)") 75 }, "parentElement should work correctly in a document (element)")
77 test(function() { 76 test(function() {
78 var text = document.createElement("div") 77 var text = document.createElement("div")
79 assert_equals(text.parentElement, null) 78 assert_equals(text.parentElement, null)
80 document.body.appendChild(text) 79 document.body.appendChild(text)
81 assert_equals(text.parentElement, document.body) 80 assert_equals(text.parentElement, document.body)
82 }, "parentElement should work correctly in a document (text)") 81 }, "parentElement should work correctly in a document (text)")
83 </script> 82 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698