merge for backout of changeset 2c00478d356a (bug 458563) for orange

This commit is contained in:
Shawn Wilsher 2008-11-01 18:18:46 -04:00
commit 09be8f8a3a
4 changed files with 4 additions and 29278 deletions

View File

@ -50,9 +50,7 @@ _TEST_FILES = parser_datreader.js \
html5lib_tree_dat2.txt \
html5lib_tree_dat3.txt \
html5_tree_construction_exceptions.js \
htmltagsoup_dat1.txt \
test_html5_tree_construction.html \
test_htmltagsoup.html \
test_bug339350.xhtml \
test_bug358797.html \
test_bug396568.html \

File diff suppressed because it is too large Load Diff

View File

@ -67,32 +67,18 @@ function trimString(s) {
*/
function parseTestcase(testcase) {
var lines = testcase.split("\n");
/* check that the first non-empty, non-comment line is #data */
for each (var line in lines) {
if (!line || startsWith(line, "##")) {
continue;
}
if (line == "#data")
break;
if (lines[0] != "#data") {
log(lines);
throw "Unknown test format."
}
var input = [];
var output = [];
var errors = [];
var currentList = input;
for each (var line in lines) {
if (!line || startsWith(line, "##")) {
if (startsWith(line, "##todo")) {
todo(false, line.substring(6));
}
continue;
}
if (!(startsWith(line, "#error") ||
startsWith(line, "#document") ||
startsWith(line, "#data"))) {
if (line && !(startsWith(line, "#error") ||
startsWith(line, "#document") ||
startsWith(line, "#data"))) {
if (currentList == output && startsWith(line, "|")) {
currentList.push(line.substring(2));
} else {

View File

@ -1,36 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=458563
-->
<head>
<title>HTML tag soup parser tests</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
<script type="application/javascript;version=1.7"
src="parser_datreader.js"></script>
<script type="application/javascript">var html5Exceptions = {}</script>
<script class="testbody" type="application/javascript;version=1.7">
var parserDatFiles = ["htmltagsoup_dat1.txt"];
</script>
<script type="application/javascript;version=1.7"
src="parser_web_testrunner.js"></script>
</head>
<body>
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=458563"
target="_blank">Mozilla Bug 458563</a>
<div id="content">
<iframe src="" id="testframe"></iframe>
</div>
See http://mxr.mozilla.org/mozilla/source/parser/htmlparser/tests/html/ for original test data<br>
<div id="display">
</div>
</body>
</html>