Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / shadow-dom-scope.html
blob70e5a369caa994ac249920f062c6ff0a3adc0dc8
1 <html>
2 <head>
3 <title>Selectors and Shadow Scopes</title>
4 <style>
5 input[type=range] {
6 -webkit-appearance: none;
8 </style>
9 <script>
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 var head;
15 var input;
16 var logDiv;
17 var SELECTOR_TEST_PROPERTIES = ' { height: 1px; -webkit-appearance: none; }';
19 // convenience constants
20 var MATCH = true;
21 var NO_MATCH = false;
23 function log(msg, success)
25 logDiv.appendChild(document.createElement('div')).innerHTML = msg + ': ' + (success ? 'PASS' : 'FAIL');
28 function runSelectorTest(matchExpected, selector)
30 var style = document.createElement('style');
31 style.textContent = selector + SELECTOR_TEST_PROPERTIES;
32 head.appendChild(style);
33 var matched = input.offsetHeight == 1;
34 log('<code>' + selector + '</code> <strong>should' + (matchExpected ? '' : ' not') + '</strong> match', matchExpected ? matched : !matched);
35 head.removeChild(style);
38 function runTest()
40 head = document.getElementsByTagName('head')[0];
41 input = document.getElementsByTagName('input')[0];
42 logDiv = document.getElementById('log');
43 runSelectorTest(NO_MATCH, 'div');
44 runSelectorTest(NO_MATCH, '*');
45 runSelectorTest(NO_MATCH, 'body *');
46 document.body.removeChild(input);
49 </script>
50 </head>
51 <body onload="runTest()">
52 <p>Tests whether and how selectors cross shadow DOM scopes.</p>
53 <input id="foo" class="bar" style="height:auto" type="range">
54 <div id="log"></div>
55 </body>
56 </html>