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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/mathml/relations/css-styling/displaystyle-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>displaystyle</title>
6 <link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#S S3.SSS1">
7 <meta name="assert" content="Verify that the correct inheritance of the displays tyle value by measuring the size of large operators.">
8 <style>
9 @font-face {
10 font-family: TestFont;
11 src: url("/fonts/math/largeop-displayoperatorminheight5000.woff");
12 }
13 math {
14 font-family: TestFont;
15 font-size: 10px;
16 }
17 </style>
18 <script src="/resources/testharness.js"></script>
19 <script src="/resources/testharnessreport.js"></script>
20 <script>
21 setup({ explicit_done: true });
22 var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
23 var epsilon = 5;
24 function verify_displaystyle(element, displaystyle, description) {
25 if (typeof element === "string")
26 element = document.getElementById(element);
27 var elementSize = element.getBoundingClientRect().height;
28 if (displaystyle)
29 assert_approx_equals(elementSize, 5000 * emToPx, epsilon, description);
30 else
31 assert_approx_equals(elementSize, 1000 * emToPx, epsilon, description);
32 }
33
34 window.addEventListener("load", function() {
35 document.fonts.ready.then(runTests);
36 });
37
38 function runTests() {
39 test(function() {
40 verify_displaystyle("math_default", false, "default");
41 verify_displaystyle("math_inline", false, "explicit display inline");
42 verify_displaystyle("math_block", true, "explicit display block");
43 verify_displaystyle("math_false", false, "explicit displaystyle false");
44 verify_displaystyle("math_true", true, "explicit displaystyle true");
45 }, "math element");
46 test(function() {
47 verify_displaystyle("mstyle_false", false, "explicit displaystyle false");
48 verify_displaystyle("mstyle_true", true, "explicit displaystyle true");
49 }, "mstyle element");
50 test(function() {
51 verify_displaystyle("mtable_default", false, "default");
52 verify_displaystyle("mtable_false", false, "explicit displaystyle false");
53 verify_displaystyle("mtable_true", true, "explicit displaystyle true");
54 }, "mtable element");
55 test(function() {
56 verify_displaystyle("mfrac_numerator", false, "numerator");
57 verify_displaystyle("mfrac_denominator", false, "denominator");
58 }, "mfrac element");
59 test(function() {
60 verify_displaystyle("mroot_base", true, "base");
61 verify_displaystyle("mroot_index", false, "index");
62 }, "mroot element");
63 test(function() {
64 verify_displaystyle("msub_base", true, "base");
65 verify_displaystyle("msub_subscript", false, "subscript");
66 }, "msub element");
67 test(function() {
68 verify_displaystyle("msup_base", true, "base");
69 verify_displaystyle("msup_supscript", false, "supscript");
70 }, "msup element");
71 test(function() {
72 verify_displaystyle("msubsup_base", true, "base");
73 verify_displaystyle("msubsup_subscript", false, "subscript");
74 verify_displaystyle("msubsup_supscript", false, "supscript");
75 }, "msubsup element");
76 test(function() {
77 verify_displaystyle("munder_base", true, "base");
78 verify_displaystyle("munder_underscript", false, "underscript");
79 }, "munder element");
80 test(function() {
81 verify_displaystyle("mover_base", true, "base");
82 verify_displaystyle("mover_overscript", false, "overscript");
83 }, "mover element");
84 test(function() {
85 verify_displaystyle("munderover_base", true, "base");
86 verify_displaystyle("munderover_underscript", false, "underscript");
87 verify_displaystyle("munderover_overscript", false, "overscript");
88 }, "munderover element");
89 done();
90 }
91 </script>
92 </head>
93 <body>
94 <math><mo id="math_default">&#x2AFF;</mo></math>
95 <math display="inline"><mo id="math_inline">&#x2AFF;</mo></math>
96 <math display="block"><mo id="math_block">&#x2AFF;</mo></math>
97 <math displaystyle="false"><mo id="math_false">&#x2AFF;</mo></math>
98 <math displaystyle="true"><mo id="math_true">&#x2AFF;</mo></math>
99 <math><mstyle displaystyle="false"><mo id="mstyle_false">&#x2AFF;</mo></mstyle ></math>
100 <math><mstyle displaystyle="true"><mo id="mstyle_true">&#x2AFF;</mo></mstyle>< /math>
101 <math displaystyle="true"><mtable><mtr><mtd><mo id="mtable_default">&#x2AFF;</ mo></mtd></mtr></mtable></math>
102 <math><mtable displaystyle="true"><mtr><mtd><mo id="mtable_true">&#x2AFF;</mo> </mtd></mtr></mtable></math>
103 <math displaystyle="true"><mtable displaystyle="false"><mtr><mtd><mo id="mtabl e_false">&#x2AFF;</mo></mtd></mtr></mtable></math>
104 <math displaystyle="true"><mfrac><mo id="mfrac_numerator">&#x2AFF;</mo><mo id= "mfrac_denominator">&#x2AFF;</mo></mfrac></math>
105 <math displaystyle="true"><mroot><mo id="mroot_base">&#x2AFF;</mo><mo id="mroo t_index">&#x2AFF;</mo></mroot></math>
106 <math displaystyle="true"><msub><mo id="msub_base">&#x2AFF;</mo><mo id="msub_s ubscript">&#x2AFF;</mo></msub></math>
107 <math displaystyle="true"><msup><mo id="msup_base">&#x2AFF;</mo><mo id="msup_s upscript">&#x2AFF;</mo></msup></math>
108 <math displaystyle="true"><msubsup><mo id="msubsup_base">&#x2AFF;</mo><mo id=" msubsup_subscript">&#x2AFF;</mo><mo id="msubsup_supscript">&#x2AFF;</mo></msubsu p></math>
109 <math displaystyle="true"><mmultiscripts><mo id="mmultiscripts_base">&#x2AFF;< /mo><mo id="mmultiscripts_subscript">&#x2AFF;</mo><mo id="mmultiscripts_supscrip t">&#x2AFF;</mo><mprescripts/><mo id="mmultiscripts_presubscript">&#x2AFF;</mo>< mo id="mmultiscripts_presupscript">&#x2AFF;</mo></mmultiscripts></math>
110 <math displaystyle="true"><munder><mo id="munder_base">&#x2AFF;</mo><mo id="mu nder_underscript">&#x2AFF;</mo></munder></math>
111 <math displaystyle="true"><mover><mo id="mover_base">&#x2AFF;</mo><mo id="move r_overscript">&#x2AFF;</mo></mover></math>
112 <math displaystyle="true"><munderover><mo id="munderover_base">&#x2AFF;</mo><m o id="munderover_underscript">&#x2AFF;</mo><mo id="munderover_overscript">&#x2AF F;</mo></munderover></math>
113 </body>
114 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698