Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / background-shorthand-csstext.html
blob96be581aa3327ddaa53912a9850289445ab64bdd
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.testRunner)
32 testRunner.dumpAsText();
34 shouldBe("document.body.style.background == 'green'", true);
35 shouldBe("document.getElementById('div1').style.background == ''", true);
36 shouldBe("document.getElementById('div2').style.background == '50% 50% blue'", true);
37 shouldBe("document.getElementById('div3').style.background == 'none repeat scroll rgb(255, 255, 255)'", true);
39 </script>
40 </head>
42 <body onload="test();" style="background: green; color:white">
44 <div id="div1" style="background-repeat: repeat-x, repeat-y; background-color:white"></div>
45 <div id="div2" style="background: 50% 50% blue"></div>
46 <div id="div3" style="background: rgb(255, 255, 255) none repeat scroll"></div>
48 <p>This page tests whether or not the background shorthand properly omits
49 initial values.
50 <hr>
52 <div id='console' style="background-color:white; border:2px solid black"></div>
54 </body>
55 </html>