mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 801545 - Remove DocumentType.internalSubset, r=bz
The C++ method GetInternalSubset() and related apparatus remains, and is used by the XML serializer etc. --HG-- extra : commitid : 3IVZZkyD3HI extra : amend_source : 477c91b1bd4bfa8c77b0bec7ea7dbf6c57667094
This commit is contained in:
parent
ac34eda1f1
commit
9a6f8aa5dd
@ -510,7 +510,6 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec
|
||||
[test_bug433533.html]
|
||||
[test_bug433662.html]
|
||||
[test_bug435425.html]
|
||||
[test_bug438519.html]
|
||||
[test_bug444030.xhtml]
|
||||
[test_bug444322.html]
|
||||
[test_bug444722.html]
|
||||
|
@ -1,44 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=438519
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 438519</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="doTest()">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=438519">Mozilla Bug 438519</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display:none">
|
||||
|
||||
<iframe id="empty" src="data:text/xml,<!DOCTYPE HTML []><html></html>"></iframe>
|
||||
<iframe id="missing" src="data:text/xml,<!DOCTYPE HTML><html></html>"></iframe>
|
||||
<iframe id="entity" src="data:text/xml,<!DOCTYPE HTML [ <!ENTITY foo 'foo'> ]><html></html>"></iframe>
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 218236 **/
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function doTest() {
|
||||
function checkInternalSubset(id, expected) {
|
||||
var e = document.getElementById(id);
|
||||
is(e.contentDocument.doctype.internalSubset, expected, "checking '" + id + "'");
|
||||
}
|
||||
|
||||
checkInternalSubset("empty", "");
|
||||
checkInternalSubset("missing", null);
|
||||
checkInternalSubset("entity", " <!ENTITY foo 'foo'> ");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -24,7 +24,6 @@ function checkDoc(title, expectedtitle, normalizedtitle) {
|
||||
is(doc.doctype.name, "html");
|
||||
is(doc.doctype.publicId, "");
|
||||
is(doc.doctype.systemId, "");
|
||||
is(doc.doctype.internalSubset, null, "internalSubset should be null!");
|
||||
isElement(doc.documentElement, "html");
|
||||
isElement(doc.documentElement.firstChild, "head");
|
||||
if (title !== undefined) {
|
||||
|
@ -7,5 +7,4 @@
|
||||
"Historical DOM features must be removed: getAttributeNodeNS": true,
|
||||
"Historical DOM features must be removed: setAttributeNode": true,
|
||||
"Historical DOM features must be removed: removeAttributeNode": true,
|
||||
"DocumentType member must be nuked: internalSubset": true
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ dtdTests = ["attrgetownerelement01", "documentimportnode03",
|
||||
"getNamedItemNS03", "getNamedItemNS04", "hasAttribute02",
|
||||
"hasAttributeNS04", "importNode07", "importNode09",
|
||||
"importNode10", "importNode11", "importNode12", "importNode13",
|
||||
"internalSubset01", "localName02", "namednodemapgetnameditemns01",
|
||||
"localName02", "namednodemapgetnameditemns01",
|
||||
"namednodemapremovenameditemns02",
|
||||
"namednodemapremovenameditemns05", "namednodemapsetnameditemns05",
|
||||
"namednodemapsetnameditemns09", "namednodemapsetnameditemns10",
|
||||
|
@ -93,7 +93,6 @@ support-files =
|
||||
[test_documentimportnode20.html]
|
||||
[test_documentimportnode21.html]
|
||||
[test_documentimportnode22.html]
|
||||
[test_documenttypeinternalSubset01.html]
|
||||
[test_documenttypepublicid01.html]
|
||||
[test_documenttypesystemid01.html]
|
||||
[test_domimplementationcreatedocument03.html]
|
||||
@ -192,7 +191,6 @@ support-files =
|
||||
[test_importNode15.html]
|
||||
[test_importNode16.html]
|
||||
[test_importNode17.html]
|
||||
[test_internalSubset01.html]
|
||||
[test_localName01.html]
|
||||
[test_localName02.html]
|
||||
[test_localName03.html]
|
||||
|
@ -1,123 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/documenttypeinternalSubset01</title>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="DOMTestCase.js"></script>
|
||||
<script type="text/javascript" src="exclusions.js"></script>
|
||||
<script type="text/javascript">
|
||||
// expose test function names
|
||||
function exposeTestFunctionNames()
|
||||
{
|
||||
return ['documenttypeinternalSubset01'];
|
||||
}
|
||||
|
||||
var docsLoaded = -1000000;
|
||||
var builder = null;
|
||||
|
||||
//
|
||||
// This function is called by the testing framework before
|
||||
// running the test suite.
|
||||
//
|
||||
// If there are no configuration exceptions, asynchronous
|
||||
// document loading is started. Otherwise, the status
|
||||
// is set to complete and the exception is immediately
|
||||
// raised when entering the body of the test.
|
||||
//
|
||||
function setUpPage() {
|
||||
setUpPageStatus = 'running';
|
||||
try {
|
||||
//
|
||||
// creates test document builder, may throw exception
|
||||
//
|
||||
builder = createConfiguredBuilder();
|
||||
|
||||
docsLoaded = 0;
|
||||
|
||||
var docRef = null;
|
||||
if (typeof(this.doc) != 'undefined') {
|
||||
docRef = this.doc;
|
||||
}
|
||||
docsLoaded += preload(docRef, "doc", "staffNS");
|
||||
|
||||
if (docsLoaded == 1) {
|
||||
setUpPage = 'complete';
|
||||
}
|
||||
} catch(ex) {
|
||||
catchInitializationError(builder, ex);
|
||||
setUpPage = 'complete';
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This method is called on the completion of
|
||||
// each asychronous load started in setUpTests.
|
||||
//
|
||||
// When every synchronous loaded document has completed,
|
||||
// the page status is changed which allows the
|
||||
// body of the test to be executed.
|
||||
function loadComplete() {
|
||||
if (++docsLoaded == 1) {
|
||||
setUpPageStatus = 'complete';
|
||||
runJSUnitTests();
|
||||
markTodos();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
var docName = 'documenttypeinternalSubset01';
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
The method getInternalSubset() returns the internal subset as a string.
|
||||
|
||||
Create a new DocumentType node with null values for publicId and systemId.
|
||||
Verify that its internal subset is null.
|
||||
|
||||
* @author IBM
|
||||
* @author Neil Delima
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-Core-DocType-internalSubset
|
||||
* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=259
|
||||
*/
|
||||
function documenttypeinternalSubset01() {
|
||||
var success;
|
||||
if(checkInitialization(builder, "documenttypeinternalSubset01") != null) return;
|
||||
var doc;
|
||||
var docType;
|
||||
var domImpl;
|
||||
var internal;
|
||||
var nullNS = null;
|
||||
|
||||
|
||||
var docRef = null;
|
||||
if (typeof(this.doc) != 'undefined') {
|
||||
docRef = this.doc;
|
||||
}
|
||||
doc = load(docRef, "doc", "staffNS");
|
||||
domImpl = doc.implementation;
|
||||
docType = domImpl.createDocumentType("l2:root",nullNS,nullNS);
|
||||
internal = docType.internalSubset;
|
||||
|
||||
assertNull("internalSubsetNull",internal);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/documenttypeinternalSubset01</h2>
|
||||
<p></p>
|
||||
<p>
|
||||
Copyright (c) 2001-2004 World Wide Web Consortium,
|
||||
(Massachusetts Institute of Technology, European Research Consortium
|
||||
for Informatics and Mathematics, Keio University). All
|
||||
Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the
|
||||
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -1,122 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>http://www.w3.org/2001/DOM-Test-Suite/level2/core/internalSubset01</title>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="DOMTestCase.js"></script>
|
||||
<script type="text/javascript" src="exclusions.js"></script>
|
||||
<script type="text/javascript">
|
||||
// expose test function names
|
||||
function exposeTestFunctionNames()
|
||||
{
|
||||
return ['internalSubset01'];
|
||||
}
|
||||
|
||||
var docsLoaded = -1000000;
|
||||
var builder = null;
|
||||
|
||||
//
|
||||
// This function is called by the testing framework before
|
||||
// running the test suite.
|
||||
//
|
||||
// If there are no configuration exceptions, asynchronous
|
||||
// document loading is started. Otherwise, the status
|
||||
// is set to complete and the exception is immediately
|
||||
// raised when entering the body of the test.
|
||||
//
|
||||
function setUpPage() {
|
||||
setUpPageStatus = 'running';
|
||||
try {
|
||||
//
|
||||
// creates test document builder, may throw exception
|
||||
//
|
||||
builder = createConfiguredBuilder();
|
||||
|
||||
docsLoaded = 0;
|
||||
|
||||
var docRef = null;
|
||||
if (typeof(this.doc) != 'undefined') {
|
||||
docRef = this.doc;
|
||||
}
|
||||
docsLoaded += preload(docRef, "doc", "staff2");
|
||||
|
||||
if (docsLoaded == 1) {
|
||||
setUpPage = 'complete';
|
||||
}
|
||||
} catch(ex) {
|
||||
catchInitializationError(builder, ex);
|
||||
setUpPage = 'complete';
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This method is called on the completion of
|
||||
// each asychronous load started in setUpTests.
|
||||
//
|
||||
// When every synchronous loaded document has completed,
|
||||
// the page status is changed which allows the
|
||||
// body of the test to be executed.
|
||||
function loadComplete() {
|
||||
if (++docsLoaded == 1) {
|
||||
setUpPageStatus = 'complete';
|
||||
runJSUnitTests();
|
||||
markTodos();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
var docName = 'internalSubset01';
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
The "getInternalSubset()" method returns
|
||||
the internal subset as a string or null if there is none.
|
||||
This does not contain the delimiting brackets.
|
||||
|
||||
Retrieve the documenttype.
|
||||
Apply the "getInternalSubset()" method. Null is returned since there
|
||||
is not an internal subset.
|
||||
|
||||
* @author NIST
|
||||
* @author Mary Brady
|
||||
* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-Core-DocType-internalSubset
|
||||
*/
|
||||
function internalSubset01() {
|
||||
var success;
|
||||
if(checkInitialization(builder, "internalSubset01") != null) return;
|
||||
var doc;
|
||||
var docType;
|
||||
var internal;
|
||||
|
||||
var docRef = null;
|
||||
if (typeof(this.doc) != 'undefined') {
|
||||
docRef = this.doc;
|
||||
}
|
||||
doc = load(docRef, "doc", "staff2");
|
||||
docType = doc.doctype;
|
||||
|
||||
internal = docType.internalSubset;
|
||||
|
||||
assertNull("internalSubsetNull",internal);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/internalSubset01</h2>
|
||||
<p></p>
|
||||
<p>
|
||||
Copyright (c) 2001-2004 World Wide Web Consortium,
|
||||
(Massachusetts Institute of Technology, European Research Consortium
|
||||
for Informatics and Mathematics, Keio University). All
|
||||
Rights Reserved. This work is distributed under the <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">W3C(r) Software License</a> in the
|
||||
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -14,9 +14,6 @@ interface DocumentType : Node {
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
|
||||
// Mozilla extension
|
||||
readonly attribute DOMString? internalSubset;
|
||||
};
|
||||
|
||||
DocumentType implements ChildNode;
|
||||
|
@ -9,9 +9,6 @@
|
||||
[Historical DOM features must be removed: createCDATASection]
|
||||
expected: FAIL
|
||||
|
||||
[DocumentType member must be nuked: internalSubset]
|
||||
expected: FAIL
|
||||
|
||||
[Node member must be nuked: namespaceURI]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user