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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/scripts/underover-parameters-1.html

Issue 2434253002: Import wpt@7e8373f4bd144e66c88535983aa735b28c934cfe (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years, 2 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Underscripts and Overscripts parameters</title>
6 <link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S3.html#S S4">
7 <meta name="assert" content="Elements munder, mover, munderover correctly use th e limit parameters from the MATH table.">
8 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script>
10 <style>
11 math, mspace, mo {
12 font-size: 10px;
13 }
14 @font-face {
15 font-family: lowerlimitbaselinedropmin3000;
16 src: url("/fonts/math/limits-lowerlimitbaselinedropmin3000.woff");
17 }
18 @font-face {
19 font-family: lowerlimitgapmin11000;
20 src: url("/fonts/math/limits-lowerlimitgapmin11000.woff");
21 }
22 @font-face {
23 font-family: upperlimitbaselinerisemin5000;
24 src: url("/fonts/math/limits-upperlimitbaselinerisemin5000.woff");
25 }
26 @font-face {
27 font-family: upperlimitgapmin7000;
28 src: url("/fonts/math/limits-upperlimitgapmin7000.woff");
29 }
30 </style>
31 <script>
32 var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
33 var epsilon = 1;
34
35 function getBox(aId) {
36 return document.getElementById(aId).getBoundingClientRect();
37 }
38
39 setup({ explicit_done: true });
40 window.addEventListener("load", function() {
41 document.fonts.ready.then(runTests);
42 });
43
44 function runTests() {
45 test(function() {
46 var v = 3000 * emToPx;
47 assert_approx_equals(getBox("under00011").top - getBox("ref0001").bottom,
48 v, epsilon, "munder: under shift");
49 assert_approx_equals(getBox("under00012").top - getBox("ref0001").bottom,
50 v, epsilon, "munderover: under shift");
51 }, "LowerLimitBaselineDropMin");
52
53 test(function() {
54 var v = 11000 * emToPx;
55 assert_approx_equals(getBox("under00021").top - getBox("ref0002").bottom,
56 v, epsilon, "munder: under gap");
57 assert_approx_equals(getBox("under00022").top - getBox("ref0002").bottom,
58 v, epsilon, "munderover: under gap");
59 }, "LowerLimitGapMin");
60
61 test(function() {
62 var v = 5000 * emToPx;
63 assert_approx_equals(getBox("ref0003").top - getBox("over00031").bottom,
64 v, epsilon, "mover: over shift");
65 assert_approx_equals(getBox("ref0003").top - getBox("over00032").bottom,
66 v, epsilon, "munderover: over shift");
67 }, "UpperLimitBaselineRiseMin");
68
69 test(function() {
70 var v = 7000 * emToPx;
71 assert_approx_equals(getBox("ref0004").top - getBox("over00041").bottom,
72 v, epsilon, "mover: over shift");
73 assert_approx_equals(getBox("ref0004").top - getBox("over00042").bottom,
74 v, epsilon, "munderover: over shift");
75 }, "UpperLimitGapMin");
76
77 done();
78 }
79 </script>
80 </head>
81 <body>
82 <p>
83 <math style="font-family: lowerlimitbaselinedropmin3000;">
84 <mspace id="ref0001" height="1em" width="3em" mathbackground="green"/>
85 <munder>
86 <mo movablelimits="false">&#x2211;</mo>
87 <mspace id="under00011" depth="1em" width="3em" mathbackground="blue"/ >
88 </munder>
89 <munderover>
90 <mo movablelimits="false">&#x2211;</mo>
91 <mspace id="under00012" depth="1em" width="3em" mathbackground="blue"/ >
92 <mspace height="1em" width="3em" mathbackground="black"/>
93 </munderover>
94 </math>
95 </p>
96 <hr/>
97 <p>
98 <math style="font-family: lowerlimitgapmin11000;">
99 <mspace id="ref0002" height="1em" width="3em" mathbackground="green"/>
100 <munder>
101 <mo movablelimits="false">&#x2211;</mo>
102 <mspace id="under00021" depth="1em" width="3em" mathbackground="blue"/ >
103 </munder>
104 <munderover>
105 <mo movablelimits="false">&#x2211;</mo>
106 <mspace id="under00022" depth="1em" width="3em" mathbackground="blue"/ >
107 <mspace height="1em" width="3em" mathbackground="black"/>
108 </munderover>
109 </math>
110 </p>
111 <hr/>
112 <p>
113 <math style="font-family: upperlimitbaselinerisemin5000;">
114 <mspace id="ref0003" height="1em" width="3em" mathbackground="green"/>
115 <mover>
116 <mo movablelimits="false">&#x2211;</mo>
117 <mspace id="over00031" height="1em" width="3em" mathbackground="blue"/ >
118 </mover>
119 <munderover>
120 <mo movablelimits="false">&#x2211;</mo>
121 <mspace height="1em" width="3em" mathbackground="black"/>
122 <mspace id="over00032" height="1em" width="3em" mathbackground="blue"/ >
123 </munderover>
124 </math>
125 </p>
126 <hr/>
127 <p>
128 <math style="font-family: upperlimitgapmin7000;">
129 <mspace id="ref0004" height="1em" width="3em" mathbackground="green"/>
130 <mover>
131 <mo movablelimits="false">&#x2211;</mo>
132 <mspace id="over00041" depth="1em" width="3em" mathbackground="blue"/>
133 </mover>
134 <munderover>
135 <mo movablelimits="false">&#x2211;</mo>
136 <mspace height="1em" width="3em" mathbackground="black"/>
137 <mspace id="over00042" depth="1em" width="3em" mathbackground="blue"/>
138 </munderover>
139 </math>
140 </p>
141 <hr/>
142 </body>
143 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698