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

Side by Side Diff: LayoutTests/fast/css/getComputedStyle/computed-style-properties.html

Issue 973623002: Fix serialization of content property to always quote (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add another method Created 5 years, 9 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 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <style> 5 <style>
6 #test { 6 #test {
7 width: 400px; 7 width: 400px;
8 margin: 10px; 8 margin: 10px;
9 } 9 }
10 #test > div { 10 #test > div {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 { 58 {
59 var element = document.getElementById(id); 59 var element = document.getElementById(id);
60 var style = window.getComputedStyle(element, pseudo); 60 var style = window.getComputedStyle(element, pseudo);
61 if (!style) 61 if (!style)
62 return null; 62 return null;
63 return style.getPropertyValue(property); 63 return style.getPropertyValue(property);
64 } 64 }
65 65
66 shouldBe("computedStyleFor('outline', null, 'outline-offset')", "'5px'"); 66 shouldBe("computedStyleFor('outline', null, 'outline-offset')", "'5px'");
67 67
68 shouldBe("computedStyleFor('content', 'before', 'content')", "'text'"); 68 shouldBe("computedStyleFor('content', 'before', 'content')", '"\'text\'"');
69 shouldBe("computedStyleFor('content', 'after', 'content')", '"\'test \' url(data :image/gif;base64,R0lGODlhAQABAJAAAP8AAAAAACwAAAAAAQABAAACAgQBADs=)"'); 69 shouldBe("computedStyleFor('content', 'after', 'content')", '"\'test \' url(data :image/gif;base64,R0lGODlhAQABAJAAAP8AAAAAACwAAAAAAQABAAACAgQBADs=)"');
70 shouldBe("computedStyleFor('counter', null, 'counter-reset')", "'section 0'"); 70 shouldBe("computedStyleFor('counter', null, 'counter-reset')", "'section 0'");
71 var str = computedStyleFor('subcounter', null, 'counter-reset'); 71 var str = computedStyleFor('subcounter', null, 'counter-reset');
72 shouldBe("str.indexOf('subsection 0') != -1", "true"); 72 shouldBe("str.indexOf('subsection 0') != -1", "true");
73 shouldBe("str.indexOf('anothercounter 5') != -1", "true"); 73 shouldBe("str.indexOf('anothercounter 5') != -1", "true");
74 shouldBe("computedStyleFor('counter1', 'before', 'counter-increment')", "'sectio n 1'"); 74 shouldBe("computedStyleFor('counter1', 'before', 'counter-increment')", "'sectio n 1'");
75 shouldBe("computedStyleFor('subcounter2', 'before', 'counter-increment')", "'sub section 1'"); 75 shouldBe("computedStyleFor('subcounter2', 'before', 'counter-increment')", "'sub section 1'");
76 shouldBe("computedStyleFor('subcounter2', 'before', 'content')", '"counter(secti on) \'.\' counter(subsection) \'. \'"'); 76 shouldBe("computedStyleFor('subcounter2', 'before', 'content')", '"counter(secti on) \'.\' counter(subsection) \'. \'"');
77 </script> 77 </script>
78 </html> 78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698