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

Side by Side Diff: LayoutTests/svg/custom/zoomed-alignment-baseline.html

Issue 1052373007: Limit recent SVG baseline tests to a stable subset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months 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 <!doctype html> 1 <!doctype html>
2 <title>Test that alignment-baseline is unaffected by zoom level</title> 2 <title>Test that alignment-baseline is unaffected by zoom level</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <svg width="250" height="140" viewBox="0 0 250 140" 5 <svg width="250" height="140" viewBox="0 0 250 140"
6 xmlns="http://www.w3.org/2000/svg" version="1.1"> 6 xmlns="http://www.w3.org/2000/svg" version="1.1">
7 <style> 7 <style>
8 text { 8 text {
9 font-family: ahem; 9 font-family: ahem;
10 font-size: 20px; 10 font-size: 20px;
11 } 11 }
12 </style> 12 </style>
13 <text x="15" y="40">before<tspan>inter</tspan>after</text> 13 <text x="15" y="40">before<tspan>inter</tspan>after</text>
14 <script> 14 <script>
15 var alignmentBaselineValues = ["baseline", "before-edge", "text-before-edge" , "middle", 15 var alignmentBaselineValues = ["baseline", "central", "after-edge", "text-af ter-edge",
16 "central", "after-edge", "text-after-edge", 16 "ideograpic", "alphabetic", "mathematical"];
17 "ideograpic", "alphabetic", "hanging", "mathe matical"];
18 var expectedDeltas = { 17 var expectedDeltas = {
19 "baseline" : 0, 18 "baseline" : 0,
20 "before-edge": -16, 19 "before-edge": -16,
21 "text-before-edge": -16, 20 "text-before-edge": -16,
22 "middle": -8, 21 "middle": -8,
23 "central": -6, 22 "central": -6,
24 "after-edge": 4, 23 "after-edge": 4,
25 "text-after-edge": 4, 24 "text-after-edge": 4,
26 "ideograpic": 0, 25 "ideograpic": 0,
27 "alphabetic": 0, 26 "alphabetic": 0,
(...skipping 11 matching lines...) Expand all
39 document.querySelector('tspan').getStartPositionOfChar(0).y); 38 document.querySelector('tspan').getStartPositionOfChar(0).y);
40 test(function () { 39 test(function () {
41 assert_approx_equals(baselineShiftDelta, expectedDeltas[alignmen tBaselineValue], 1); 40 assert_approx_equals(baselineShiftDelta, expectedDeltas[alignmen tBaselineValue], 1);
42 }, "Text bounds height at zoom " + zoom + " with alignment-baseline= " + alignmentBaselineValue); 41 }, "Text bounds height at zoom " + zoom + " with alignment-baseline= " + alignmentBaselineValue);
43 }); 42 });
44 }); 43 });
45 html.style.zoom = 1; 44 html.style.zoom = 1;
46 </script> 45 </script>
47 </svg> 46 </svg>
48 <p>This test requires the Ahem font</p> 47 <p>This test requires the Ahem font</p>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/custom/zoomed-alignment-baseline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698