mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision d73b07b850fa51f23e846518bb6e8c59c58eef19
This commit is contained in:
parent
62031e3cb0
commit
7776ed79d7
107 changed files with 3306 additions and 538 deletions
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Baseline of inferred mrows</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mrow">
|
||||
<meta name="assert" content="Baseline for mrow-like elements is correct.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script type="text/javascript">
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", runTests);
|
||||
function runTests()
|
||||
{
|
||||
["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"].forEach((tag) => {
|
||||
var x = document.getElementById("above" + tag).getBoundingClientRect();
|
||||
var y = document.getElementById("below" + tag).getBoundingClientRect();
|
||||
test(function() {
|
||||
assert_equals(x.bottom, y.top);
|
||||
}, "baseline alignment inside " + tag);
|
||||
});
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math><mrow><mspace id="aboveMrow" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowMrow" width="10px" depth="30px" style="background: blue"></mspace></mrow></math>
|
||||
<math><msqrt><mspace id="aboveSqrt" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowSqrt" width="10px" depth="30px" style="background: blue"></mspace></msqrt></math>
|
||||
<math><mstyle><mspace id="aboveStyle" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowStyle" width="10px" depth="30px" style="background: blue"></mspace></mstyle></math>
|
||||
<math><merror><mspace id="aboveError" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowError" width="10px" depth="30px" style="background: blue"></mspace></merror></math>
|
||||
<math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" style="background: purple"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" style="background: blue"></mspace></mphantom></math>
|
||||
<math><mspace id="aboveMath" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowMath" width="10px" depth="30px" style="background: blue"></mspace></math>
|
||||
<math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" style="background: purple"
|
||||
></mspace><mspace id="belowMenclose" width="10px" depth="30px" style="background: blue"></mspace></menclose></math>
|
||||
<math><mpadded notation="box"><mspace id="aboveMpadded" width="10px" height="30px" style="background: purple"
|
||||
></mspace><mspace id="belowMpadded" width="10px" depth="30px" style="background: blue"></mspace></mpadded></math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Stretchy in inferred mrows</title>
|
||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mrow">
|
||||
<meta name="assert" content="Baseline for mrow-like elements is correct.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
mo {
|
||||
font-size: 10px;
|
||||
font-family: axisheight5000-verticalarrow14000;
|
||||
}
|
||||
@font-face {
|
||||
font-family: axisheight5000-verticalarrow14000;
|
||||
src: url("/fonts/math/axisheight5000-verticalarrow14000.woff");
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
setup({ explicit_done: true });
|
||||
window.addEventListener("load", function() {
|
||||
// Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
|
||||
requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
|
||||
});
|
||||
function runTests()
|
||||
{
|
||||
["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"].forEach((tag) => {
|
||||
var mo = document.getElementById("mo" + tag);
|
||||
test(function() {
|
||||
assert_greater_than_equal(mo.getBoundingClientRect().height, 100);
|
||||
}, "operator stretching inside " + tag);
|
||||
});
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math><mrow><mo id="moMrow">↨</mo><mspace width="1px" height="100px" style="background: blue"></mspace></mrow></math>
|
||||
<math><msqrt><mo id="moSqrt">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></msqrt></math>
|
||||
<math><mstyle><mo id="moStyle">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mstyle></math>
|
||||
<math><merror><mo id="moError">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></merror></math>
|
||||
<math><mphantom><mo style="visibilty: visible;" id="moPhantom">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mphantom></math>
|
||||
<math><mo id="moMath">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></math>
|
||||
<math><menclose notation="box"><mo id="moMenclose">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></menclose></math>
|
||||
<math><mpadded notation="box"><mo id="moMpadded">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mpadded></math>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue