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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/styles/test-008.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/styles/test-008.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/styles/test-008.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/styles/test-008.html
index 8648a263a246ff95cba4fc0ef4d717fec993b467..431aa85ff0c0d89ec21c2141e487eaba2c0ae24b 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/styles/test-008.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/shadow-dom/untriaged/styles/test-008.html
@@ -16,80 +16,41 @@ policies and contribution forms [3].
<meta name="assert" content="Styles:the styles of the shadow host are inherited by the children of the shadow root">
<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);
d.body.innerHTML = '' +
- '<div id="shHost" style="font-size:10px">' +
- '<span id="spn1">This is a shadow host child</span>' +
- '</div>';
+ '<div id="shHost" style="font-size:10px">' +
+ '<span id="spn1">This is a shadow host child</span>' +
+ '</div>';
var host = d.querySelector('#shHost');
- var s = host.createShadowRoot();
+ var s = host.attachShadow({mode: 'open'});
- var div = d.createElement('div');
- div.innerHTML ='<span id="spn2">This is a shadow root child</span>';
- s.appendChild(div);
+ var div = d.createElement('div');
+ div.innerHTML ='<span id="spn2">This is a shadow root child</span>';
+ s.appendChild(div);
- assert_equals(d.querySelector('#spn1').offsetTop, 0,
- 'Element should not be rendered');
- assert_true(s.querySelector('#spn2').offsetTop > 0,
- 'Element should be rendered');
+ assert_equals(d.querySelector('#spn1').offsetTop, 0,
+ 'Element should not be rendered');
+ assert_true(s.querySelector('#spn2').offsetTop > 0,
+ 'Element should be rendered');
- var oldHeight = s.querySelector('#spn2').offsetHeight;
+ var oldHeight = s.querySelector('#spn2').offsetHeight;
- host.setAttribute('style', 'font-size:20px');
+ host.setAttribute('style', 'font-size:20px');
- assert_true(s.querySelector('#spn2').offsetHeight > oldHeight,
- 'Shadow host style must be aplied to the shadow root children');
+ assert_true(s.querySelector('#spn2').offsetHeight > oldHeight,
+ 'Shadow host style must be aplied to the shadow root children');
}), 'A_06_00_09_T01');
-
-
-
-
-test(unit(function (ctx) {
- var d = newRenderedHTMLDocument(ctx);
-
- d.body.innerHTML =
- '<ul class="cls" style="font-size: 10px">' +
- '<li id="li1" class="shadow">1</li>' +
- '<li id="li2" class="shadow2">2</li>' +
- '<li id="li3" class="shadow">3</li>' +
- '<li id="li4">4</li>' +
- '<li id="li5" class="shadow">5</li>' +
- '<li id="li6" class="shadow2">6</li>' +
- '</ul>';
-
- var host = d.querySelector('.cls');
- //Shadow root to play with
- var s = host.createShadowRoot();
-
- var div = d.createElement('div');
- div.innerHTML ='<ul><content select=".shadow"></content></ul>';
- s.appendChild(div);
-
- var height1 = d.querySelector('#li1').offsetHeight;
- var height3 = d.querySelector('#li3').offsetHeight;
- var height5 = d.querySelector('#li5').offsetHeight;
-
- host.setAttribute('style', 'font-size: 20px');
-
- assert_true(d.querySelector('#li1').offsetHeight > height1,
- 'Point 1: Shadow host style must be aplied to the shadow root children');
- assert_true(d.querySelector('#li3').offsetHeight > height3,
- 'Point 2: Shadow host style must be aplied to the shadow root children');
- assert_true(d.querySelector('#li5').offsetHeight > height5,
- 'Point 3: Shadow host style must be aplied to the shadow root children');
-
-
-}), 'A_06_00_09_T02');
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698