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