Backed out changeset fcdfaa991183 (bug 1539759) for causing failures at browser_elementindtd.js. CLOSED TREE

This commit is contained in:
Butkovits Atila 2022-02-14 16:58:20 +02:00
Родитель 72508c0bdd
Коммит 386bb5b47c
4 изменённых файлов: 1 добавлений и 41 удалений

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

@ -6,10 +6,7 @@ prefs =
[browser_viewsource.js]
support-files =
file_viewsource.html
[browser_elementindtd.js]
support-files =
browser_elementindtd.xml
browser_elementindtd.dtd
[browser_ysod_telemetry.js]
support-files =
broken_xml.xhtml

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

@ -1,2 +0,0 @@
<!ENTITY entitywithelement
'<p id="fromdtd">From dtd</p>'>

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

@ -1,25 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* https://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/*
* Test for bug 1539759
* Loads a chrome XML document that has an exteernal DTD file with an entity
* that contains an element, and verifies that that element was not inserted
* into the document (but its content was).
*/
add_task(async function test() {
await BrowserTestUtils.withNewTab(getRootDirectory(gTestPath) + "browser_elementindtd.xml",
async function (newBrowser) {
// NB: We load the chrome:// page in the parent process.
testNoElementFromEntity(newBrowser);
});
});
function testNoElementFromEntity(newBrowser) {
let doc = newBrowser.contentDocument;
is(doc.body.textContent, "From dtd", "Should load DTD.");
is(doc.body.firstElementChild, null, "Shouldn't have an element inserted from the DTD");
}

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

@ -1,10 +0,0 @@
<!DOCTYPE html
[
<!ENTITY % externaldtd SYSTEM "chrome://mochitests/content/browser/parser/htmlparser/tests/mochitest/browser_elementindtd.dtd" >
%externaldtd;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
&entitywithelement;
</body>
</html>