| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>Test that baseline-shift is unaffected by zoom level</title> | 2 <title>Test that baseline-shift is unaffected by zoom level</title> |
| 3 <script src="../../resources/ahem.js"></script> |
| 3 <script src="../../resources/testharness.js"></script> | 4 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharnessreport.js"></script> | 5 <script src="../../resources/testharnessreport.js"></script> |
| 5 <svg width="250" height="140" viewBox="0 0 250 140" | 6 <svg width="250" height="140" viewBox="0 0 250 140" |
| 6 xmlns="http://www.w3.org/2000/svg" version="1.1"> | 7 xmlns="http://www.w3.org/2000/svg" version="1.1"> |
| 7 <style> | 8 <style> |
| 8 text { | 9 text { |
| 9 font-family: ahem; | 10 font-family: ahem; |
| 10 font-size: 20px; | 11 font-size: 20px; |
| 11 } | 12 } |
| 12 </style> | 13 </style> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 25 test(function () { | 26 test(function () { |
| 26 assert_equals(Math.abs(baselineShiftDelta), 10, "Baseline half a
font-size up or down"); | 27 assert_equals(Math.abs(baselineShiftDelta), 10, "Baseline half a
font-size up or down"); |
| 27 }, "Text bounds height at zoom " + zoom + " with baseline-shift=" +
baselineShiftValue); | 28 }, "Text bounds height at zoom " + zoom + " with baseline-shift=" +
baselineShiftValue); |
| 28 }); | 29 }); |
| 29 }); | 30 }); |
| 30 html.style.zoom = 1; | 31 html.style.zoom = 1; |
| 31 // Clean up to avoid being classified as a text test; avoids an -expected.tx
t file. | 32 // Clean up to avoid being classified as a text test; avoids an -expected.tx
t file. |
| 32 document.querySelector('text').remove(); | 33 document.querySelector('text').remove(); |
| 33 </script> | 34 </script> |
| 34 </svg> | 35 </svg> |
| OLD | NEW |