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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.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/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html
index e9d720546e9362ca5fe313be106ab52ce509047d..76519d662614229d97e45e7a1fb66b71266e1090 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-attributes/test-010.html
@@ -16,58 +16,59 @@ policies and contribution forms [3].
<meta name="assert" content="ShadowRoot Object: innerHTML of type DOMString; Test setter">
<script src="../../../../../../../resources/testharness.js"></script>
<script src="../../../../../../../resources/testharnessreport.js"></script>
-<script src="../../../testcommon.js"></script>
+<script src="../../../../../html/resources/common.js"></script>
+<script src="../../../../resources/shadow-dom-utils.js"></script>
</head>
<body>
<div id="log"></div>
<script>
test(unit(function (ctx) {
- var d = newRenderedHTMLDocument(ctx);
+ var d = newRenderedHTMLDocument(ctx);
- var host = d.createElement('div');
- d.body.appendChild(host);
- var s = host.createShadowRoot();
+ var host = d.createElement('div');
+ d.body.appendChild(host);
+ var s = host.attachShadow({mode: 'open'});
- var span = d.createElement('span');
- span.innerHTML = 'Some text';
- s.appendChild(span);
+ var span = d.createElement('span');
+ span.innerHTML = 'Some text';
+ s.appendChild(span);
- s.innerHTML = '<input type="text"><div>new text</div>';
+ s.innerHTML = '<input type="text"><div>new text</div>';
assert_equals(s.innerHTML.toLowerCase(), '<input type="text"><div>new text</div>',
- 'Wrong value of ShadowRoot innerHTML attribute');
+ 'Wrong value of ShadowRoot innerHTML attribute');
}), 'A_10_01_01_04_02_T01_01');
test(unit(function (ctx) {
- var d = newRenderedHTMLDocument(ctx);
+ var d = newRenderedHTMLDocument(ctx);
- var host = d.createElement('div');
- d.body.appendChild(host);
- var s = host.createShadowRoot();
+ var host = d.createElement('div');
+ d.body.appendChild(host);
+ var s = host.attachShadow({mode: 'open'});
- var span = d.createElement('span');
- span.setAttribute('id', 'spanId');
- span.innerHTML = 'Some text';
- s.appendChild(span);
+ var span = d.createElement('span');
+ span.setAttribute('id', 'spanId');
+ span.innerHTML = 'Some text';
+ s.appendChild(span);
- s.innerHTML = '<input type="text" id="inputId"><div id="divId">new text</div>';
+ s.innerHTML = '<input type="text" id="inputId"><div id="divId">new text</div>';
assert_equals(s.querySelector('#spanId'), null, 'Point 1:innerHTML attribute must replace all content of ' +
- 'the ShadowRoot object');
+ 'the ShadowRoot object');
assert_true(s.querySelector('#inputId') != null, 'Point 2:innerHTML attribute must replace all content of ' +
- 'the ShadowRoot object');
+ 'the ShadowRoot object');
assert_equals(s.querySelector('#inputId').getAttribute('id'), 'inputId',
- 'Point 3:innerHTML attribute must replace all content of the ShadowRoot object');
+ 'Point 3:innerHTML attribute must replace all content of the ShadowRoot object');
assert_true(s.querySelector('#divId') != null, 'Point 3:innerHTML attribute must replace all content of ' +
- 'the ShadowRoot object');
- assert_equals(s.querySelector('#divId').getAttribute('id'), 'divId',
- 'Point 4:innerHTML attribute must replace all content of the ShadowRoot object');
+ 'the ShadowRoot object');
+ assert_equals(s.querySelector('#divId').getAttribute('id'), 'divId',
+ 'Point 4:innerHTML attribute must replace all content of the ShadowRoot object');
}), 'A_10_01_01_04_02_T01_02');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698