Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalid-not-with-simple-selector-sequence.html
blob593f2331740c273634c63f2322cb5bb08c01895c
1 <!doctype html>
2 <!-- Adapted from http://samples.msdn.microsoft.com/ietestcenter/css3/selectors/notSelectorSequence.htm -->
3 <html>
4 <head>
5 <title>:not selector with simple selector sequence</title>
6 <style type="text/css">
7 div {
8 color: green;
11 /* div#foo is not a simple selector, but a simple selector sequence.
12 Hence :not(div#foo) is invalid and the entire rule must be dropped.
13 The same applies for others below. */
14 div, div:not(div#foo) {
15 color: red;
17 div, div:not(div.bar) {
18 color: red;
20 div, div:not(#foo.bar) {
21 color: red;
23 div, div:not([name="x"]#foo) {
24 color: red;
26 div, div:not(:nth-child(odd).bar) {
27 color: red;
29 </style>
30 </head>
31 <body>
32 <p>The test passes if the Filler Text below is green.</p>
33 <div id="test">Filler Text</div>
34 <div id="testresult" style="color: blue">Running</div>
35 <script type="text/javascript">
36 function ArrayContains(array, value, ci)
38 for (var i = 0; i < array.length; i++) {
39 if (ci && array[i].toLowerCase() == value.toLowerCase())
40 return true;
41 else if (array[i] == value)
42 return true;
44 return false;
46 function TestCase()
48 try {
49 var target = document.getElementById("test");
50 var val = getComputedStyle(target, null).getPropertyValue("color");
51 var aExpectedValues = new Array("green", "#008000", "rgb(0, 128, 0)");
53 if (ArrayContains(aExpectedValues, val, true)) {
54 document.getElementById("testresult").innerHTML = "Pass";
55 return;
57 } catch(e) {}
59 document.getElementById("testresult").innerHTML = "Fail";
61 TestCase();
62 if (window.testRunner)
63 testRunner.dumpAsText();
64 </script>
65 </body>
66 </html>