Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: LayoutTests/fast/dom/background-shorthand-csstext.html

Issue 846933002: Handle null in value list in getLayeredShorthandValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix more tests Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function print(message, color) 4 function print(message, color)
5 { 5 {
6 var paragraph = document.createElement("div"); 6 var paragraph = document.createElement("div");
7 paragraph.appendChild(document.createTextNode(message)); 7 paragraph.appendChild(document.createTextNode(message));
8 paragraph.style.fontFamily = "monospace"; 8 paragraph.style.fontFamily = "monospace";
9 if (color) 9 if (color)
10 paragraph.style.color = color; 10 paragraph.style.color = color;
(...skipping 14 matching lines...) Expand all
25 else 25 else
26 print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ". ", "red"); 26 print("FAIL: " + a + " should be " + b + " but instead is " + evalA + ". ", "red");
27 } 27 }
28 28
29 function test() 29 function test()
30 { 30 {
31 if (window.testRunner) 31 if (window.testRunner)
32 testRunner.dumpAsText(); 32 testRunner.dumpAsText();
33 33
34 shouldBe("document.body.style.background == 'green'", true); 34 shouldBe("document.body.style.background == 'green'", true);
35 shouldBe("document.getElementById('div1').style.background == 'repeat-x, rep eat-y white'", true); 35 shouldBe("document.getElementById('div1').style.background == ''", true);
36 shouldBe("document.getElementById('div2').style.background == '50% 50% blue' ", true); 36 shouldBe("document.getElementById('div2').style.background == '50% 50% blue' ", true);
37 shouldBe("document.getElementById('div3').style.background == 'none repeat s croll rgb(255, 255, 255)'", true); 37 shouldBe("document.getElementById('div3').style.background == 'none repeat s croll rgb(255, 255, 255)'", true);
38 } 38 }
39 </script> 39 </script>
40 </head> 40 </head>
41 41
42 <body onload="test();" style="background: green; color:white"> 42 <body onload="test();" style="background: green; color:white">
43 43
44 <div id="div1" style="background-repeat: repeat-x, repeat-y; background-color:wh ite"></div> 44 <div id="div1" style="background-repeat: repeat-x, repeat-y; background-color:wh ite"></div>
45 <div id="div2" style="background: 50% 50% blue"></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> 46 <div id="div3" style="background: rgb(255, 255, 255) none repeat scroll"></div>
47 47
48 <p>This page tests whether or not the background shorthand properly omits 48 <p>This page tests whether or not the background shorthand properly omits
49 initial values. 49 initial values.
50 <hr> 50 <hr>
51 51
52 <div id='console' style="background-color:white; border:2px solid black"></div> 52 <div id='console' style="background-color:white; border:2px solid black"></div>
53 53
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698