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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/fractions/frac-parameters-2.html

Issue 2425083003: Import wpt@4114c724042b41e257caab98f3eb23c143b50de4 (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/fractions/frac-parameters-2.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/fractions/frac-parameters-2.html b/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/fractions/frac-parameters-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..08d639dd48889115b89b776eaa0e279c81758a81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/fractions/frac-parameters-2.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Stack parameters</title>
+<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S3.html#SS3.SSS2">
+<meta name="assert" content="Element mfrac correctly uses the stack parameters from the MATH table.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ math, mspace {
+ font-size: 10px;
+ }
+ @font-face {
+ font-family: axisheight7000;
+ src: url("/fonts/math/stack-axisheight7000.woff");
+ }
+ @font-face {
+ font-family: bottomdisplaystyleshiftdown5000;
+ src: url("/fonts/math/stack-bottomdisplaystyleshiftdown5000.woff");
+ }
+ @font-face {
+ font-family: bottomshiftdown6000;
+ src: url("/fonts/math/stack-bottomshiftdown6000.woff");
+ }
+ @font-face {
+ font-family: displaystylegapmin4000;
+ src: url("/fonts/math/stack-displaystylegapmin4000.woff");
+ }
+ @font-face {
+ font-family: gapmin8000;
+ src: url("/fonts/math/stack-gapmin8000.woff");
+ }
+ @font-face {
+ font-family: topdisplaystyleshiftup3000;
+ src: url("/fonts/math/stack-topdisplaystyleshiftup3000.woff");
+ }
+ @font-face {
+ font-family: topshiftup9000;
+ src: url("/fonts/math/stack-topshiftup9000.woff");
+ }
+</style>
+<script>
+ var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
+ var epsilon = 1;
+
+ function getBox(aId) {
+ return document.getElementById(aId).getBoundingClientRect();
+ }
+
+ setup({ explicit_done: true });
+ window.addEventListener("load", function() {
+ document.fonts.ready.then(runTests);
+ });
+
+ function runTests() {
+ test(function() {
+ var v = 7000 * emToPx;
+ assert_approx_equals(getBox("ref0001").top - getBox("num0001").bottom,
+ v, epsilon, "mfrac: axis height");
+ }, "AxisHeight");
+
+ test(function() {
+ var v = 5000 * emToPx;
+ assert_approx_equals(getBox("den0002").top - getBox("ref0002").bottom,
+ v, epsilon, "mfrac: denominator shift");
+ }, "BottomDisplayStyleShiftDown");
+
+ test(function() {
+ var v = 6000 * emToPx;
+ assert_approx_equals(getBox("den0003").top - getBox("ref0003").bottom,
+ v, epsilon, "mfrac: denominator shift");
+ }, "BottomShiftDown");
+
+ test(function() {
+ var v = 4000 * emToPx;
+ assert_approx_equals(getBox("den0004").top - getBox("num0004").bottom,
+ v, epsilon, "mfrac: gap");
+ }, "DisplayStyleGapMin");
+
+ test(function() {
+ var v = 8000 * emToPx;
+ assert_approx_equals(getBox("den0005").top - getBox("num0005").bottom,
+ v, epsilon, "mfrac: gap");
+ }, "GapMin");
+
+ test(function() {
+ var v = 3000 * emToPx;
+ assert_approx_equals(getBox("ref0006").top - getBox("num0006").bottom,
+ v, epsilon, "mfrac: numerator shift");
+ }, "TopDisplayStyleShiftUp");
+
+ test(function() {
+ var v = 9000 * emToPx;
+ assert_approx_equals(getBox("ref0007").top - getBox("num0007").bottom,
+ v, epsilon, "mfrac: numerator shift");
+ }, "ToShiftUp");
+
+ done();
+ }
+</script>
+</head>
+<body>
+ <p>
+ <math style="font-family: axisheight7000;">
+ <mspace id="ref0001" depth="1em" width="3em" mathbackground="green"/>
+ <mfrac linethickness="0px">
+ <mspace width="3em" height="1em" id="num0001" mathbackground="blue"/>
+ <mspace width="3em"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math display="block" style="font-family: bottomdisplaystyleshiftdown5000;">
+ <mspace id="ref0002" width="3em" height="1em" mathbackground="green"/>
+ <mfrac linethickness="0px">
+ <mspace width="3em"/>
+ <mspace width="3em" depth="1em" id="den0002" mathbackground="blue"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math style="font-family: bottomshiftdown6000;">
+ <mspace id="ref0003" width="3em" height="1em" mathbackground="green"/>
+ <mfrac linethickness="0px">
+ <mspace width="3em"/>
+ <mspace width="3em" depth="1em" id="den0003" mathbackground="blue"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math display="block" style="font-family: displaystylegapmin4000;">
+ <mfrac linethickness="0px">
+ <mspace width="3em" height="1em" id="num0004" mathbackground="blue"/>
+ <mspace width="3em" depth="1em" id="den0004" mathbackground="green"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math style="font-family: gapmin8000;">
+ <mfrac linethickness="0px">
+ <mspace width="3em" height="1em" id="num0005" mathbackground="blue"/>
+ <mspace width="3em" depth="1em" id="den0005" mathbackground="green"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math display="block" style="font-family: topdisplaystyleshiftup3000;">
+ <mspace id="ref0006" width="3em" depth="1em" mathbackground="green"/>
+ <mfrac linethickness="0px">
+ <mspace width="3em" height="1em" id="num0006" mathbackground="blue"/>
+ <mspace width="3em"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+ <p>
+ <math style="font-family: topshiftup9000;">
+ <mspace id="ref0007" width="3em" depth="1em" mathbackground="green"/>
+ <mfrac linethickness="0px">
+ <mspace width="3em" height="1em" id="num0007" mathbackground="blue"/>
+ <mspace width="3em"/>
+ </mfrac>
+ </math>
+ </p>
+ <hr/>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698