Bug 1357844 - Split MathML entity test into multiple files, r=annevk

This was timing out and causing OOM on some platforms, so instead use
one doctype per test.

MozReview-Commit-ID: 7M2FCJVPElK
This commit is contained in:
James Graham 2017-04-19 21:45:01 +01:00
Родитель 8f8474ed8e
Коммит 1a54030e40
22 изменённых файлов: 396 добавлений и 39 удалений

Просмотреть файл

@ -55466,6 +55466,11 @@
{}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm": [
[
{}
]
],
"html/the-xhtml-syntax/parsing-xhtml-fragments/.gitkeep": [
[
{}
@ -99385,10 +99390,84 @@
{}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm": [
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm",
{}
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-10.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-10.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-2.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-2.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-3.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-3.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-4.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-4.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-5.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-5.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-6.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-6.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-7.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-7.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-8.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-8.htm",
{
"timeout": "long"
}
]
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-9.htm": [
[
"/html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-9.htm",
{
"timeout": "long"
}
]
],
"html/webappapis/animation-frames/callback-exception.html": [
@ -166163,7 +166242,7 @@
"testharness"
],
"dom/nodes/Element-classlist.html": [
"46a9b0e29b876f32a47675eee1b7c8330dfa5625",
"7e3b68e65468fba0708f4084a9b2f6af93edde90",
"testharness"
],
"dom/nodes/Element-closest.html": [
@ -184842,10 +184921,50 @@
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm": [
"060659a3aafbbf51c8e1a909d5e7d451fdba2893",
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-1.htm": [
"3c58f1659b1e7a06fbc9068a243b8777fb00b730",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-10.htm": [
"a57ac305ef379f0ddd61c0bb401278855b87146c",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-2.htm": [
"a599308e7803ede1851741a813f4eb4838554a32",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-3.htm": [
"2313b85385e2cad99257ca985c005126eb2fc009",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-4.htm": [
"af4c7c1bb4b26dcc8c6e8dc53201499f0086de4e",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-5.htm": [
"5e4189278e14a78fc78edb7960ff33c69f9fa4bf",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-6.htm": [
"0fd5c5703309abab66cf553da9685d8e766f5278",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-7.htm": [
"b7a95380287b3c8299f2028d055cb68e1f11fc6e",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-8.htm": [
"61c32e514cdc7b3d40f6a7bdb0d4babf19ec562c",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-9.htm": [
"c35672e53b9ebe1d778de8ec8ea654390389bea5",
"testharness"
],
"html/the-xhtml-syntax/parsing-xhtml-documents/xhtml-mathml-dtd-entity-support.htm": [
"f675bac0053a5e0b8dffe83cbaf48709537409d7",
"support"
],
"html/the-xhtml-syntax/parsing-xhtml-fragments/.gitkeep": [
"da39a3ee5e6b4b0d3255bfef95601890afd80709",
"support"

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-1.htm]
type: testharness
[XHTML1.0 Transitional parsing ⃜]
expected: FAIL
[XHTML1.0 Transitional parsing ̑]
expected: FAIL
[XHTML1.0 Transitional parsing ⃛]
expected: FAIL
[XHTML1.0 Transitional parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-2.htm]
type: testharness
[XHTML1.1 parsing ⃜]
expected: FAIL
[XHTML1.1 parsing ̑]
expected: FAIL
[XHTML1.1 parsing ⃛]
expected: FAIL
[XHTML1.1 parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-3.htm]
type: testharness
[XHTML1.0 Strict parsing ⃜]
expected: FAIL
[XHTML1.0 Strict parsing ̑]
expected: FAIL
[XHTML1.0 Strict parsing ⃛]
expected: FAIL
[XHTML1.0 Strict parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-4.htm]
type: testharness
[XHTML1.0 Frameset parsing ⃜]
expected: FAIL
[XHTML1.0 Frameset parsing ̑]
expected: FAIL
[XHTML1.0 Frameset parsing ⃛]
expected: FAIL
[XHTML1.0 Frameset parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-5.htm]
type: testharness
[XHTML Basic parsing ⃜]
expected: FAIL
[XHTML Basic parsing ̑]
expected: FAIL
[XHTML Basic parsing ⃛]
expected: FAIL
[XHTML Basic parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-6.htm]
type: testharness
[XHTML1.1+MathML parsing ⃜]
expected: FAIL
[XHTML1.1+MathML parsing ̑]
expected: FAIL
[XHTML1.1+MathML parsing ⃛]
expected: FAIL
[XHTML1.1+MathML parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-7.htm]
type: testharness
[XHTML1.1+MathML+SVG parsing ⃜]
expected: FAIL
[XHTML1.1+MathML+SVG parsing ̑]
expected: FAIL
[XHTML1.1+MathML+SVG parsing ⃛]
expected: FAIL
[XHTML1.1+MathML+SVG parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-8.htm]
type: testharness
[MathML parsing ⃜]
expected: FAIL
[MathML parsing ̑]
expected: FAIL
[MathML parsing ⃛]
expected: FAIL
[MathML parsing ⃛]
expected: FAIL

Просмотреть файл

@ -0,0 +1,14 @@
[xhtml-mathml-dtd-entity-9.htm]
type: testharness
[XHTML Mobile parsing ⃜]
expected: FAIL
[XHTML Mobile parsing ̑]
expected: FAIL
[XHTML Mobile parsing ⃛]
expected: FAIL
[XHTML Mobile parsing ⃛]
expected: FAIL

Просмотреть файл

@ -838,7 +838,7 @@
"support"
],
"dom/classList.html": [
"37b0684fa9b869ab3a538cceac4fb5a825f3fff9",
"f289334e7b3486259b9aae54b4282a7211b8813e",
"testharness"
],
"fetch/api/redirect/redirect-referrer-mixed-content.js": [

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Transitional//EN", "foo", "XHTML1.0 Transitional"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["text/html", null, null, "HTML"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1//EN", "foo", "XHTML1.1"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Strict//EN", "foo", "XHTML1.0 Strict"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Frameset//EN", "foo", "XHTML1.0 Frameset"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML Basic 1.0//EN", "foo", "XHTML Basic"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN", "foo", "XHTML1.1+MathML"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN", "foo", "XHTML1.1+MathML+SVG"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//W3C//DTD MathML 2.0//EN", "foo", "MathML"]);
</script>

Просмотреть файл

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta name=timeout content=long>
<title>HTML entities for various XHTML Doctype</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="test" src="xhtml-mathml-dtd-entity-support.htm"></iframe>
<script>
onload = () => document.getElementById("test").contentWindow.run(
["application/xhtml+xml", "-//WAPFORUM//DTD XHTML Mobile 1.0//EN", "foo", "XHTML Mobile"]);
</script>

Просмотреть файл

@ -1,10 +1,5 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>HTML entities for various XHTML Doctype variants</title>
<link rel=help href="http://w3c.github.io/html/xhtml.html#parsing-xhtml-documents">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var parser = new DOMParser();
var parse = parser.parseFromString.bind(parser);
@ -20,13 +15,13 @@
doctypeString += '>';
var doc = parse(doctypeString + "<html><head></head><body id='test'>"+entitystring+"</body></html>", mimeType);
var root = doc.getElementById('test');
assert_not_equals(root, null, friendlyMime + " parsing the entity reference caused a parse error;");
assert_true(!!root.firstChild);
parent.assert_not_equals(root, null, friendlyMime + " parsing the entity reference caused a parse error;");
parent.assert_true(!!root.firstChild);
// Next line because some browsers include the partial parsed result in the parser error returned document.
assert_equals(root.firstChild.nodeType, 3/*Text*/, friendlyMime + " parsing the entity reference caused a parse error;");
parent.assert_equals(root.firstChild.nodeType, 3/*Text*/, friendlyMime + " parsing the entity reference caused a parse error;");
var text = root.firstChild.data;
for (var i = 0, len = expectedString.length; i < len; i++) {
assert_equals(text.charCodeAt(i),expectedString.charCodeAt(i));
parent.assert_equals(text.charCodeAt(i),expectedString.charCodeAt(i));
}
}
}
@ -34,34 +29,21 @@
function setupTests(jsonEntities, publicId, systemId, mimeType, friendlyMime) {
for (entityName in jsonEntities) {
if ((mimeType == "text/html") || /;$/.test(entityName)) {
test(generateTestFunction(entityName, jsonEntities[entityName].characters, publicId, systemId, mimeType, friendlyMime), friendlyMime + " parsing " + entityName);
parent.test(generateTestFunction(entityName, jsonEntities[entityName].characters, publicId, systemId, mimeType, friendlyMime), friendlyMime + " parsing " + entityName);
}
}
}
setup(function() {}, {explicit_done: true});
parent.setup(function() {}, {explicit_done: true});
var xhr = new XMLHttpRequest();
xhr.open("GET", "/common/entities.json");
xhr.onload = function () {
var entitiesJSON = JSON.parse(xhr.response);
[
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Transitional//EN", "foo", "XHTML1.0 Transitional"],
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1//EN", "foo", "XHTML1.1"],
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Strict//EN", "foo", "XHTML1.0 Strict"],
["application/xhtml+xml", "-//W3C//DTD XHTML 1.0 Frameset//EN", "foo", "XHTML1.0 Frameset"],
["application/xhtml+xml", "-//W3C//DTD XHTML Basic 1.0//EN", "foo", "XHTML Basic"],
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN", "foo", "XHTML1.1+MathML"],
["application/xhtml+xml", "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN", "foo", "XHTML1.1+MathML+SVG"],
["application/xhtml+xml", "-//W3C//DTD MathML 2.0//EN", "foo", "MathML"],
["application/xhtml+xml", "-//WAPFORUM//DTD XHTML Mobile 1.0//EN", "foo", "XHTML Mobile"],
// ["application/xhtml+xml", null, "mathml.dtd", "SYSTEM MathML"], // Experimental
["text/html", null, null, "HTML"]
].forEach(function (row) {
function run(row) {
var xhr = new XMLHttpRequest();
xhr.open("GET", "/common/entities.json");
xhr.onload = function () {
var entitiesJSON = JSON.parse(xhr.response);
setupTests(entitiesJSON, row[1], row[2], row[0], row[3]);
});
done();
parent.done();
}
xhr.send();
}
xhr.send();
</script>