Changeset 107464 in webkit
- Timestamp:
- Feb 10, 2012 5:37:23 PM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107462 r107464 1 2012-02-10 Mike Lawther <mikelawther@chromium.org> 2 3 CSS3 calc: convert font-size-fractional test to use pre/post js 4 https://bugs.webkit.org/show_bug.cgi?id=78347 5 6 Reviewed by Ojan Vafai. 7 8 * css3/calc/font-size-fractional-expected.txt: 9 * css3/calc/font-size-fractional.html: 10 1 11 2012-02-10 Tony Chang <tony@chromium.org> 2 12 -
trunk/LayoutTests/css3/calc/font-size-fractional-expected.txt
r104431 r107464 1 The font size and line height of these lines should be identical 2 The font size and line height of these lines should be identical 3 FAIL 4 Line heights do not match 1 Tests that CSS3 calc() can be used with the font property using fractional sizes 5 2 6 Font sizes do not match 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 FAIL getComputedStyle(document.getElementById("calc-reduce"), null).lineHeight should be 24px. Was normal. 7 FAIL getComputedStyle(document.getElementById("calc-reduce"), null).fontSize should be 10px. Was 12px. 8 PASS successfullyParsed is true 9 10 TEST COMPLETE 11 -
trunk/LayoutTests/css3/calc/font-size-fractional.html
r104431 r107464 1 <!DOCTYPE HTML> 2 <script src="../../fast/js/resources/js-test-pre.js"></script> 1 3 <style> 2 4 body {font-size: 12px;} … … 5 7 </style> 6 8 7 <div >9 <div id="test-container"> 8 10 <span id="control">The font size and line height of these lines should be identical</span> 9 11 <hr/> 10 <span id="calc-reduce">The font size and line height of these lines should be identical</span>12 <span class="fonttest" id="calc-reduce">The font size and line height of these lines should be identical</span> 11 13 </div> 12 14 <hr/> 13 <div id="results"></div>14 15 15 16 <script> 16 if (window.layoutTestController) 17 layoutTestController.dumpAsText(); 18 var controlHeight = getComputedStyle(document.getElementById("control"), null).lineHeight; 19 var controlSize = getComputedStyle(document.getElementById("control"), null).fontSize; 17 description("Tests that CSS3 calc() can be used with the font property using fractional sizes"); 20 18 21 var spans = document.getElementsByTagName("span"); 22 var sameHeight = true; 23 var sameSize = true; 19 var spans = document.getElementsByClassName("fonttest"); 24 20 for (var i = 0; i < spans.length; ++i) { 25 21 var current = spans[i]; 26 if (sameHeight) 27 sameHeight = getComputedStyle(current, null).lineHeight == controlHeight; 28 if (sameSize) 29 sameSize = getComputedStyle(current, null).fontSize == controlSize; 22 shouldBeEqualToString('getComputedStyle(document.getElementById("' + current.id + '"), null).lineHeight', getComputedStyle(document.getElementById("control"), null).lineHeight); 23 shouldBeEqualToString('getComputedStyle(document.getElementById("' + current.id + '"), null).fontSize', getComputedStyle(document.getElementById("control"), null).fontSize); 30 24 } 31 25 32 var results = document.getElementById("results"); 33 if (sameHeight && sameSize) { 34 results.style.color = "green"; 35 results.innerHTML = "PASS"; 36 } else { 37 results.style.color = "red"; 38 results.innerHTML = "FAIL"; 39 if (!sameHeight) 40 results.innerHTML += "<p>Line heights do not match</p>"; 41 if (!sameSize) 42 results.innerHTML += "<p>Font sizes do not match</p>"; 43 } 44 26 if (window.layoutTestController) 27 document.body.removeChild(document.getElementById("test-container")); 45 28 </script> 29 <script src="../../fast/js/resources/js-test-post.js"></script>
Note: See TracChangeset
for help on using the changeset viewer.