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

Side by Side Diff: LayoutTests/svg/css/getComputedStyle-basic.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 <body> 2 <body>
3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/ xlink"> 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/ xlink">
4 <g id="g" stroke="orange" stroke-width="2px" marker-start="url(#pserver)"> 4 <g id="g" stroke="orange" stroke-width="2px" marker-start="url(#pserver)">
5 <rect id="rect" width="100" height="100" fill="blue" /> 5 <rect id="rect" width="100" height="100" fill="blue" />
6 </g> 6 </g>
7 </svg> 7 </svg>
8 <div id="log"></div> 8 <div id="log"></div>
9 <script src="../../fast/css/getComputedStyle/resources/property-names.js"/> 9 <script src="../../fast/css/getComputedStyle/resources/property-names.js"/>
10 <script><![CDATA[ 10 <script><![CDATA[
11 if (window.testRunner) 11 if (window.testRunner)
12 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
13 13
14 function debugLog(s) { 14 function debugLog(s) {
15 var logDiv = document.getElementById("log"); 15 var logDiv = document.getElementById("log");
16 logDiv.appendChild(document.createTextNode(s)); 16 logDiv.appendChild(document.createTextNode(s));
17 logDiv.appendChild(document.createElementNS("http://www.w3.org/1999/xhtm l", "br")); 17 logDiv.appendChild(document.createElementNS("http://www.w3.org/1999/xhtm l", "br"));
18 } 18 }
19 19
20 function printStyle(elementId) { 20 function printStyle(elementId) {
21 var element = document.getElementById(elementId); 21 var element = document.getElementById(elementId);
22 var style = document.defaultView.getComputedStyle(element); 22 var style = document.defaultView.getComputedStyle(element);
23 23
24 for (var x = 0; x < style.length; x++) { 24 for (var x = 0; x < style.length; x++) {
25 var name = style.item(x); 25 var name = style.item(x);
26 if (!propertiesToTest[name]) 26 if (!propertiesToTest[name])
27 continue; 27 continue;
28 var value = style.getPropertyValue(name); 28 var value = style.getPropertyValue(name);
29 var cssValue = style.getPropertyCSSValue(name);
30 debugLog(elementId + ": style.getPropertyValue(" + name + ") : " + val ue); 29 debugLog(elementId + ": style.getPropertyValue(" + name + ") : " + val ue);
31 debugLog(elementId + ": style.getPropertyCSSValue(" + name + ") : " + cssValue);
32 } 30 }
33 } 31 }
34 32
35 printStyle("rect"); 33 printStyle("rect");
36 printStyle("g"); 34 printStyle("g");
37 ]]></script> 35 ]]></script>
38 </body> 36 </body>
39 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698