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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html

Issue 1899623002: Import latest web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle new failures 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html
index 501e6c4a9deb007badbab5c58330e291255fb105..d9d9600538d110e5954171df61643a3c085e2b5a 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-001.html
@@ -19,7 +19,7 @@ policies and contribution forms [3].
<meta name="assert" content="Upper-boundary encapsulation: The ownerDocument property of all nodes in shadow tree refers to the document of the shadow host.">
<script src="../../../../../../resources/testharness.js"></script>
<script src="../../../../../../resources/testharnessreport.js"></script>
-<script src="../../testcommon.js"></script>
+<script src="../../../../html/resources/common.js"></script>
</head>
<body>
<div id="log"></div>
@@ -27,11 +27,11 @@ policies and contribution forms [3].
test(function () {
var doc = document.implementation.createHTMLDocument('Test');
doc.body.innerHTML = '<div>A<div>B</div>C<div><span>D</span></div>E</div>';
- var nodeIterator = doc.createNodeIterator(doc.documentElement,
+ var nodeIterator = doc.createNodeIterator(doc.body,
NodeFilter.SHOW_ELEMENT, null);
var node;
while (node = nodeIterator.nextNode()) {
- var shadowRoot = node.createShadowRoot();
+ var shadowRoot = node.attachShadow({mode: 'open'});
assert_equals(shadowRoot.ownerDocument, doc);
}
}, 'ownerDocument property of a shadow root should be the document of the ' +
@@ -50,7 +50,7 @@ test(function () {
for (var depth = 1; depth <= MAX_DEPTH; ++depth) {
var host = doc.getElementById('depth-' + depth);
- var shadowRoot = host.createShadowRoot();
+ var shadowRoot = host.attachShadow({mode: 'open'});
assert_equals(shadowRoot.ownerDocument, doc,
'ownerDocument mismatch for #depth-' + depth);
}
@@ -60,7 +60,7 @@ test(function () {
test(function () {
var doc = document.implementation.createHTMLDocument('Test');
- var shadowRoot = doc.body.createShadowRoot();
+ var shadowRoot = doc.body.attachShadow({mode: 'open'});
var div = doc.createElement('div');
shadowRoot.appendChild(div);
assert_equals(div.ownerDocument, doc);
@@ -70,7 +70,7 @@ test(function () {
test(function () {
var doc1 = document.implementation.createHTMLDocument('Test 1');
var doc2 = document.implementation.createHTMLDocument('Test 2');
- var shadowRoot = doc1.body.createShadowRoot();
+ var shadowRoot = doc1.body.attachShadow({mode: 'open'});
var div = doc2.createElement('div');
shadowRoot.appendChild(div);
assert_equals(div.ownerDocument, doc1);
@@ -81,7 +81,7 @@ test(function () {
test(function () {
var doc1 = document.implementation.createHTMLDocument('Test 1');
var doc2 = document.implementation.createHTMLDocument('Test 2');
- var shadowRoot = doc1.body.createShadowRoot();
+ var shadowRoot = doc1.body.attachShadow({mode: 'open'});
doc2.body.innerHTML =
'<div id="root">A<div>B</div>C<div><span>D</span></div>E</div>';
shadowRoot.appendChild(doc2.getElementById('root'));
@@ -97,7 +97,7 @@ test(function () {
test(function () {
var doc1 = document.implementation.createHTMLDocument('Test 1');
var doc2 = document.implementation.createHTMLDocument('Test 2');
- var shadowRoot = doc1.body.createShadowRoot();
+ var shadowRoot = doc1.body.attachShadow({mode: 'open'});
doc2.body.innerHTML = '<div id="parent"><div id="child"></div></div>';
shadowRoot.appendChild(doc2.getElementById('child'));
assert_equals(doc2.getElementById('parent').ownerDocument, doc2);

Powered by Google App Engine
This is Rietveld 408576698