2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / undetectable-style-filter.html
blob0e5a7ee3529edfde99d60122ef413f2486dfdd84
1 <html>
2 <head>
3 <script>
4 function print(message, color)
6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace";
9 if (color)
10 paragraph.style.color = color;
11 document.getElementById("console").appendChild(paragraph);
14 function shouldBe(a, b)
16 var evalA;
17 try {
18 evalA = eval(a);
19 } catch(e) {
20 evalA = e;
23 if (evalA == b)
24 print("PASS: " + a + " should be " + b + " and is.", "green");
25 else
26 print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ".", "red");
29 function test()
31 if (window.layoutTestController)
32 layoutTestController.dumpAsText();
34 shouldBe("typeof document.body.style.filter", "undefined");
35 shouldBe("document.body.style.filter ? true : false", false);
36 shouldBe("document.body.style.filter == undefined", true);
38 </script>
39 </head>
41 <body onload="test();">
42 <p>This page tests whether the CSS 'filter' property is undetectable. If the test passes, you'll see a series of 'PASS' messages below.</p>
43 <hr>
45 <div id='console'></div>
47 </body>
48 </html>