3 Distributed under both the W3C Test Suite License [1] and the W3C
4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
5 policies and contribution forms [3].
7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
9 [3] http://www.w3.org/2004/10/27-testcases
13 <title>Shadow DOM Test: A_06_01_01</title>
14 <link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
15 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#css-variables">
16 <meta name="assert" content="CSS variables: The shadow host styles being inherited by the children of the shadow root must also apply to CSS Variables.">
17 <script src="../../../../../resources/testharness.js"></script>
18 <script src="../../../../../resources/testharnessreport.js"></script>
19 <script src="../../testcommon.js"></script>
20 <link rel="stylesheet" href="../../../../../resources/testharness.css">
25 //TODO For now (November, 2012) CSS variables support is not implemented yet
26 // so this test won't work. Treat it as a placeholder for now
27 test(unit(function (ctx) {
29 var d = newRenderedHTMLDocument(ctx);
30 d.head.innerHtml = '' +
32 'body {font-size:10px;}' +
37 '<li id="li1" class="shadow">1</li>' +
38 '<li id="li2" class="shadow2">2</li>' +
39 '<li id="li3" class="shadow">3</li>' +
40 '<li id="li4">4</li>' +
41 '<li id="li5" class="shadow">5</li>' +
42 '<li id="li6" class="shadow2">6</li>' +
46 var host = d.querySelector('#shHost');
47 var s = host.createShadowRoot();
49 var div = d.createElement('div');
50 div.innerHTML ='<ul><content select=".shadow"></content></ul>';
53 var defHeight1 = d.querySelector('#li1').offsetHeight;
54 var defHeight3 = d.querySelector('#li3').offsetHeight;
55 var defHeight5 = d.querySelector('#li5').offsetHeight;
57 var style = d.createElement('style');
58 style.innerHTML =':root {' +
59 'var-text-size: 30px;' +
62 'font-size: var(text-size);' +
66 assert_true(d.querySelector('#li1').offsetHeight > defHeight1, 'Point 1: Element height should be changed');
67 assert_true(d.querySelector('#li3').offsetHeight > defHeight3, 'Point 2: Element height should be changed');
68 assert_true(d.querySelector('#li5').offsetHeight > defHeight5, 'Point 3: Element height should be changed');
70 }), 'A_06_01_01_T01');