Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalid-not-with-pseudo-element.html
blobb5886634e0358ac04c7826b8de4b0d00e74ff2e9
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
2 <html>
3 <head>
4 <title>CSS Test: :not selector with :first-letter selector</title>
5 <style type="text/css">
6 div
8 color: green;
10 div, *:not(:first-letter)
12 color: red;
14 div, *:not(::first-letter)
16 color: red;
18 </style>
19 <script>
20 if (window.testRunner)
21 window.testRunner.dumpAsText();
22 </script>
23 </head>
24 <body>
25 <p>The test passes if there is no red on the page.</p>
26 <div>
27 <div id="test">Filler Text</div>
28 </div>
29 <div id="testresult" style="color: blue">Running</div>
30 <script type="text/javascript">
31 function ArrayContains(array, value, ci)
33 ci = ci == true ? true : false;
34 for (var i = 0; i < array.length; i++)
36 if (ci && array[i].toLowerCase() == value.toLowerCase())
38 return true;
40 else if (array[i] == value)
42 return true;
45 return false;
48 function TestCase()
50 try
52 var target = document.getElementById("test");
53 var val = getComputedStyle(target, null).getPropertyValue("color");
55 var aExpectedValues = new Array("green", "#008000", "rgb(0, 128, 0)");
57 if (ArrayContains(aExpectedValues, val, true))
59 document.getElementById("testresult").innerHTML = "Pass";
60 return;
62 }catch(e){}
64 document.getElementById("testresult").innerHTML = "Fail";
67 TestCase();
69 </script>
71 </body>
72 </html>