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

Side by Side Diff: LayoutTests/svg/css/glyph-orientation-rounding-test.xhtml

Issue 700843006: Don't require getPropertyCSSValue in svg tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"/> 3 <script src="../../resources/js-test.js"/>
4 </head> 4 </head>
5 <body> 5 <body>
6 <svg display="none" xmlns="http://www.w3.org/2000/svg"><text id="text"/></svg> 6 <svg display="none" xmlns="http://www.w3.org/2000/svg"><text id="text"/></svg>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"/> 8 <div id="console"/>
9 <script> 9 <script>
10 var textElement = document.getElementById("text"); 10 var textElement = document.getElementById("text");
11 var computedStyle; 11 var computedStyle;
12 12
13 function parseGlyphOrientationHelper(property, angleValue, expectedValue) 13 function parseGlyphOrientationHelper(property, angleValue, expectedValue)
14 { 14 {
15 textElement.setAttributeNS(null, property, angleValue); 15 textElement.setAttributeNS(null, property, angleValue);
16 computedStyle = textElement.ownerDocument.defaultView.getComputedStyle(textE lement); 16 computedStyle = textElement.ownerDocument.defaultView.getComputedStyle(textE lement);
17 17
18 debug("Test angleValue: '" + angleValue + "'"); 18 debug("Test angleValue: '" + angleValue + "'");
19 19
20 if (expectedValue == "auto") { 20 if (expectedValue == "auto") {
21 shouldBe("computedStyle.getPropertyValue('" + property + "')", '"auto"') ; 21 shouldBe("computedStyle.getPropertyValue('" + property + "')", '"auto"') ;
22 } else { 22 } else {
23 shouldBe("computedStyle.getPropertyCSSValue('" + property + "').getFloat Value(CSSPrimitiveValue.CSS_DEG)", "" + expectedValue); 23 shouldBe("parseFloat(computedStyle.getPropertyValue('" + property + "')) ", "" + expectedValue);
24 } 24 }
25 25
26 debug(""); 26 debug("");
27 } 27 }
28 28
29 function parseGlyphOrientation(angleValue, expectedValue) 29 function parseGlyphOrientation(angleValue, expectedValue)
30 { 30 {
31 if (expectedValue == undefined) { 31 if (expectedValue == undefined) {
32 parseGlyphOrientationHelper("glyph-orientation-horizontal", angleValue, 0.0); 32 parseGlyphOrientationHelper("glyph-orientation-horizontal", angleValue, 0.0);
33 parseGlyphOrientationHelper("glyph-orientation-vertical", angleValue, "a uto"); 33 parseGlyphOrientationHelper("glyph-orientation-vertical", angleValue, "a uto");
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 parseGlyphOrientation("45.0000", 0.0); 115 parseGlyphOrientation("45.0000", 0.0);
116 parseGlyphOrientation("45.0001", 90.0); 116 parseGlyphOrientation("45.0001", 90.0);
117 parseGlyphOrientation("135.000", 90.0); 117 parseGlyphOrientation("135.000", 90.0);
118 parseGlyphOrientation("135.001", 180.0); 118 parseGlyphOrientation("135.001", 180.0);
119 119
120 120
121 </script> 121 </script>
122 122
123 </body> 123 </body>
124 </html> 124 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698