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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Node-parentNode.html

Issue 2482213003: Import WPT tests which require non-test HTML resources. (Closed)
Patch Set: Created 4 years, 1 month 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
(Empty)
1 <!DOCTYPE html>
2 <title>Node.parentNode</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script>
7 // XXX need to test for more node types
8 test(function() {
9 assert_equals(document.parentNode, null)
10 }, "Document")
11 test(function() {
12 assert_equals(document.doctype.parentNode, document)
13 }, "Doctype")
14 test(function() {
15 assert_equals(document.documentElement.parentNode, document)
16 }, "Root element")
17 test(function() {
18 var el = document.createElement("div")
19 assert_equals(el.parentNode, null)
20 document.body.appendChild(el)
21 assert_equals(el.parentNode, document.body)
22 }, "Element")
23 var t = async_test("Removed iframe");
24 function testIframe(iframe) {
25 t.step(function() {
26 var doc = iframe.contentDocument;
27 iframe.parentNode.removeChild(iframe);
28 assert_equals(doc.firstChild.parentNode, doc);
29 });
30 t.done();
31 }
32 </script>
33 <iframe id=a src="Node-parentNode-iframe.html" onload="testIframe(this)"></ifram e>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698