Bug 1637507 [wpt PR 23558] - MathML: Regenerate tests for the operator dictionary, a=testonly

Automatic update from web-platform-tests
MathML: Regenerate tests for the operator dictionary (#23558)

- Update to the latest dictionary entries.
- Remove accent tests since default is true. https://github.com/mathml-refresh/mathml/issues/151#issuecomment-596040584
- Split into smaller files to reduce timeout risks.
--

wpt-commits: 46fe8740553c7e481dee30ab11165decc49cb100
wpt-pr: 23558
This commit is contained in:
Frédéric Wang 2020-05-20 17:00:28 +00:00 committed by moz-wptsync-bot
parent d45d2380ec
commit 1fbea66e62
33 changed files with 762 additions and 46 deletions

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric");
OperatorDictionaryTests.run(json, "largeop", 0);
done();
}
</script>

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "accent");
OperatorDictionaryTests.run(json, "largeop", 1);
done();
}
</script>

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "largeop");
OperatorDictionaryTests.run(json, "largeop", 2);
done();
}
</script>

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy");
OperatorDictionaryTests.run(json, "largeop", 3);
done();
}
</script>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "largeop", 4);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "largeop", 5);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace");
OperatorDictionaryTests.run(json, "movablelimits", 0);
done();
}
</script>

View File

@ -20,7 +20,7 @@
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "movablelimits");
OperatorDictionaryTests.run(json, "movablelimits", 1);
done();
}
</script>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "movablelimits", 2);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "movablelimits", 3);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "movablelimits", 4);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "movablelimits", 5);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 0);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 1);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 2);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 3);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 4);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "lspace/rspace", 5);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 0);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 1);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 2);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 3);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 4);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "stretchy", 5);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 0);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 1);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 2);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 3);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 4);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Operator dictionary</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-dictionary">
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#stretchy-operator-axis">
<meta name="assert" content="Verify default properties for characters that are in the operator dictionary, as well as for U+00A0 NO-BREAK SPACE">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/feature-detection.js"></script>
<script src="/mathml/support/operator-dictionary.js"></script>
<script src="./support/operator-dictionary-tests.js"></script>
<link rel="stylesheet" href="./support/operator-dictionary-tests.css"/>
<script>
setup({ explicit_done: true });
window.addEventListener("load", () => { document.fonts.ready.then(runTests); });
async function runTests() {
let json = await fetchOperatorDictionary();
OperatorDictionaryTests.run(json, "symmetric", 5);
done();
}
</script>
</head>
<body>
<div id="log"></div>
</body>
</html>

View File

@ -187,60 +187,32 @@ symmetric for "${parsedKey.characters}" (${parsedKey.form}): \
div.style.display = "none";
},
"accent": function(json, key) {
let parsedKey = splitKey(key);
let entry = json.dictionary[key];
let epsilon = 1;
// FIXME: Should really detect accent support...
assert_true(MathMLFeatureDetection.has_mover());
var defaultValue = defaultPropertyValue(entry, "accent");
document.body.insertAdjacentHTML("beforeend", `<div>\
accent for "${parsedKey.characters}" (${parsedKey.form}): \
<math>\
<mover>\
<mn>&nbsp;</mn>\
<mo form="${parsedKey.form}">${parsedKey.characters}</mo>\
</mover>\
</math>\
VS \
<math>\
<mover>\
<mn>&nbsp;</mn>\
<mo form="${parsedKey.form}" accent="${defaultValue}">${parsedKey.characters}</mo>\
</mover>\
</math>\
</div>`);
var div = document.body.lastElementChild;
var movers = div.getElementsByTagName("mover");
function gapBetweenBaseAndScript(mover) {
return mover.children[0].getBoundingClientRect().top -
mover.children[1].getBoundingClientRect().bottom;
}
var gap = gapBetweenBaseAndScript(movers[0])
var gapRef = gapBetweenBaseAndScript(movers[1])
assert_approx_equals(gap, gapRef, epsilon, `Accent property for ${key} should be '${defaultValue}'`);
div.style.display = "none";
},
run: function(json, name) {
run: function(json, name, fileIndex) {
// The operator dictionary has more than one thousand of entries so the
// tests are grouped in chunks so that these don't get much more
// importance than other MathML tests. For easy debugging, one can set the
// chunk size to 1. Also, note that the test div will remain visible for
// failed tests.
const entryPerChunk = 50
const filesPerProperty = 6
var counter = 0;
var test;
for (key in json.dictionary) {
if (counter % entryPerChunk === 0) {
// Skip this key if it does not belong to that test file.
if (counter % filesPerProperty != fileIndex) {
counter++;
continue;
}
var counterInFile = (counter - fileIndex) / filesPerProperty;
if (counterInFile % entryPerChunk === 0) {
// Start of a new chunk.
// Complete current async tests and create new ones for the next chunk.
if (test) test.done();
test = async_test(`Operator dictionary chunk ${1 + counter / entryPerChunk} - ${name}`);
test = async_test(`Operator dictionary chunk ${1 + counterInFile / entryPerChunk} - ${name}`);
}
test.step(function() {

File diff suppressed because one or more lines are too long