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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html

Issue 1363233003: Make sure <url>s are being serialized according to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix interpolation tests Created 5 years, 2 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script> 5 <script src="../../../resources/js-test.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 9
10 description("Tests that the list-style shorthand is computed properly.") 10 description("Tests that the list-style shorthand is computed properly.")
11 11
12 var testContainer = document.createElement("div"); 12 var testContainer = document.createElement("div");
13 testContainer.contentEditable = true; 13 testContainer.contentEditable = true;
14 document.body.appendChild(testContainer); 14 document.body.appendChild(testContainer);
15 15
16 testContainer.innerHTML = '<ul id="test"><li>Coffee</li><li>Tea</li><li>Coca Col a</li></ul>'; 16 testContainer.innerHTML = '<ul id="test"><li>Coffee</li><li>Tea</li><li>Coca Col a</li></ul>';
17 17
18 e = document.getElementById('test'); 18 e = document.getElementById('test');
19 computedStyle = window.getComputedStyle(e, null); 19 computedStyle = window.getComputedStyle(e, null);
20 20
21 e.style.listStyle = "circle outside url(dummy://test.png)"; 21 e.style.listStyle = "circle outside url(dummy://test.png)";
22 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(du mmy://test.png)'"); 22 shouldBeEqualToString("computedStyle.getPropertyValue('list-style')", 'circle ou tside url("dummy://test.png")');
23 23
24 e.style.listStyle = "" 24 e.style.listStyle = ""
25 e.style.listStyle = "a b c"; 25 e.style.listStyle = "a b c";
26 shouldBe("computedStyle.getPropertyValue('list-style')", "'disc outside none'"); 26 shouldBeEqualToString("computedStyle.getPropertyValue('list-style')", 'disc outs ide none');
27 27
28 e.style.listStyle = "circle outside"; 28 e.style.listStyle = "circle outside";
29 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside none'" ) 29 shouldBeEqualToString("computedStyle.getPropertyValue('list-style')", 'circle ou tside none')
30 30
31 e.style.listStyle = "none"; 31 e.style.listStyle = "none";
32 shouldBe("computedStyle.getPropertyValue('list-style')", "'none outside none'") 32 shouldBeEqualToString("computedStyle.getPropertyValue('list-style')", 'none outs ide none')
33 33
34 e.style.listStyle = ""; 34 e.style.listStyle = "";
35 e.style.listStyleType = "circle"; 35 e.style.listStyleType = "circle";
36 e.style.listStylePosition = "outside"; 36 e.style.listStylePosition = "outside";
37 e.style.listStyleImage = "url(dummy://test.png)"; 37 e.style.listStyleImage = "url(dummy://test.png)";
38 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(du mmy://test.png)'"); 38 shouldBeEqualToString("computedStyle.getPropertyValue('list-style')", 'circle ou tside url("dummy://test.png")');
39 39
40 document.body.removeChild(testContainer); 40 document.body.removeChild(testContainer);
41 41
42 </script> 42 </script>
43 </body> 43 </body>
44 </html> 44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698