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/operators/mo-axis-height-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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/operators/mo-axis-height-1.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/operators/mo-axis-height-1.html b/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/operators/mo-axis-height-1.html
new file mode 100644
index 0000000000000000000000000000000000000000..ee06e19fd579f96890f63c7824b6ee7772d4bb56
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/mathml/presentation-markup/operators/mo-axis-height-1.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>mo axis height</title>
+<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S3.html#SS2.SSS4">
+<meta name="assert" content="Element mo correctly uses the axis height parameter 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: axisheight5000-verticalarrow14000;
+ src: url("/fonts/math/axisheight5000-verticalarrow14000.woff");
+ }
+</style>
+<script>
+ var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
+ var epsilon = 5;
+
+ 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 v1 = 5000 * emToPx;
+ var moMiddle = (getBox("mo1").bottom + getBox("mo1").top) / 2;
+ assert_approx_equals(getBox("mo1").height,
+ 14000 * emToPx, epsilon, "mo: size");
+ assert_approx_equals(getBox("baseline1").bottom - moMiddle,
+ v1, epsilon, "mo: axis height");
+ }, "AxisHeight (size variant)");
+
+ test(function() {
+ var v1 = 5000 * emToPx;
+ var moMiddle = (getBox("mo2").bottom + getBox("mo2").top) / 2;
+ assert_approx_equals(getBox("mo2").height,
+ 2 * (getBox("target2").height - v1),
+ epsilon, "mo: size");
+ assert_approx_equals(getBox("baseline2").bottom - moMiddle,
+ v1, epsilon, "mo: axis height");
+ }, "AxisHeight (glyph assembly)");
+
+ done();
+ }
+</script>
+</head>
+<body>
+ <p>
+ <math style="font-family: axisheight5000-verticalarrow14000;">
+ <mrow>
+ <mspace id="baseline1" mathbackground="blue" width="50px" height="1px"/>
+ <mpadded voffset="50px"><mspace mathbackground="cyan" width="50px" height="1px"/></mpadded>
+ <mo id="mo1" symmetric="true" mathcolor="green">&#x21A8;</mo>
+ <mspace mathbackground="gray" width="10px" height="50px"/>
+ </mrow>
+ </math>
+ <math style="font-family: axisheight5000-verticalarrow14000;">
+ <mrow>
+ <mspace id="baseline2" mathbackground="blue" width="50px" height="1px"/>
+ <mpadded voffset="50px"><mspace mathbackground="cyan" width="50px" height="1px"/></mpadded>
+ <mo id="mo2" symmetric="true" mathcolor="green">&#x21A8;</mo>
+ <mspace id="target2" mathbackground="gray" width="10px" height="200px"/>
+ </mrow>
+ </math>
+ </p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698