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

Side by Side Diff: LayoutTests/svg/transforms/transform-origin-presentation-attribute.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
« no previous file with comments | « LayoutTests/svg/css/rect-system-color-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <body> 2 <body>
3 <p>Test for bug 79678 - SVG transform-origin presentation attribute. Verify that getComputedStyle() reflects an SVG element's transform-origin.</p> 3 <p>Test for bug 79678 - SVG transform-origin presentation attribute. Verify that getComputedStyle() reflects an SVG element's transform-origin.</p>
4 <p>On success, you will see a series of "PASS" messages</p> 4 <p>On success, you will see a series of "PASS" messages</p>
5 <pre id="console"></pre> 5 <pre id="console"></pre>
6 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/ xlink"> 6 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/ xlink">
7 <rect id="rect1" transform-origin="50 100" width="100" height="100" /> 7 <rect id="rect1" transform-origin="50 100" width="100" height="100" />
8 <rect id="rect2" width="100" height="100" fill="red" /> 8 <rect id="rect2" width="100" height="100" fill="red" />
9 </svg> 9 </svg>
10 <script><![CDATA[ 10 <script><![CDATA[
11 if (window.testRunner) 11 if (window.testRunner)
12 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
13 13
14 var resultString = ""; 14 var resultString = "";
15 15
16 function checkTransformOrigin(eltID, expectedValue) { 16 function checkTransformOrigin(eltID, expectedValue) {
17 var rect = document.getElementById(eltID); 17 var rect = document.getElementById(eltID);
18 var cssValue = window.getComputedStyle(rect, null).getPropertyCSSValue ("-webkit-transform-origin"); 18 var actualValue = getComputedStyle(rect).webkitTransformOrigin;
19 var actualValue = (cssValue) ? cssValue.cssText : "<no value>";
20 resultString += (actualValue == expectedValue) ? "PASS " : "FAIL "; 19 resultString += (actualValue == expectedValue) ? "PASS " : "FAIL ";
21 resultString += eltID + " transformOrigin, expected \"" + expectedValu e + "\" actual \"" + actualValue + "\"\n"; 20 resultString += eltID + " transformOrigin, expected \"" + expectedValu e + "\" actual \"" + actualValue + "\"\n";
22 } 21 }
23 22
24 checkTransformOrigin("rect1", "50px 100px"); 23 checkTransformOrigin("rect1", "50px 100px");
25 checkTransformOrigin("rect2", "0px 0px"); 24 checkTransformOrigin("rect2", "0px 0px");
26 25
27 document.getElementById("console").innerHTML = resultString; 26 document.getElementById("console").innerHTML = resultString;
28 ]]></script> 27 ]]></script>
29 </body> 28 </body>
30 </html> 29 </html>
OLDNEW
« no previous file with comments | « LayoutTests/svg/css/rect-system-color-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698