mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
Tests: Import many HTML parsing tests from WPT
I had to skip a lot of these due to assertion failures that we need to investigate before unskipping.
This commit is contained in:
parent
102cf345ba
commit
88a4a86ece
Notes:
github-actions[bot]
2024-11-03 16:52:34 +00:00
Author: https://github.com/awesomekling
Commit: 88a4a86ece
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2130
167 changed files with 9639 additions and 0 deletions
212
Tests/LibWeb/Text/input/wpt-import/html/resources/common.js
Normal file
212
Tests/LibWeb/Text/input/wpt-import/html/resources/common.js
Normal file
|
@ -0,0 +1,212 @@
|
|||
"use strict";
|
||||
|
||||
const HTML5_ELEMENTS = [
|
||||
'a', 'abbr', 'address', 'area', 'article', 'aside',
|
||||
'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote',
|
||||
'body', 'br', 'button', 'canvas', 'caption', 'cite',
|
||||
'code', 'col', 'colgroup', 'data', 'datalist', 'dd',
|
||||
'del', 'details', 'dfn', 'dialog', 'div', 'dl',
|
||||
'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure',
|
||||
'footer', 'form', 'h1', 'h2', 'h3', 'h4',
|
||||
'h5', 'h6', 'head', 'header', 'hr', 'html',
|
||||
'i', 'iframe', 'img', 'input', 'ins', 'kbd',
|
||||
'label', 'legend', 'li', 'link', 'main', 'map',
|
||||
'mark', 'menu', 'meta', 'meter', 'nav', 'noscript',
|
||||
'object', 'ol', 'optgroup', 'option', 'output', 'p',
|
||||
'param', 'pre', 'progress', 'q', 'rp', 'rt',
|
||||
'ruby', 's', 'samp', 'script', 'section', 'select',
|
||||
'slot', 'small', 'source', 'span', 'strong', 'style',
|
||||
'sub', 'sup', 'summary', 'table', 'tbody', 'td',
|
||||
'template', 'textarea', 'tfoot', 'th', 'thead', 'time',
|
||||
'title', 'tr', 'track', 'u', 'ul', 'var',
|
||||
'video', 'wbr'
|
||||
];
|
||||
|
||||
// only void (without end tag) HTML5 elements
|
||||
var HTML5_VOID_ELEMENTS = [
|
||||
'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta',
|
||||
'param', 'source', 'track', 'wbr'
|
||||
];
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/multipage/forms.html#form-associated-element
|
||||
var HTML5_FORM_ASSOCIATED_ELEMENTS = [ 'button', 'fieldset', 'input',
|
||||
'object', 'output', 'select', 'textarea' ];
|
||||
|
||||
// https://html.spec.whatwg.org/#category-label
|
||||
const HTML5_LABELABLE_ELEMENTS = [
|
||||
'button', 'input', 'meter', 'output', 'progress', 'select', 'textarea'
|
||||
];
|
||||
|
||||
const HTML5_SHADOW_ALLOWED_ELEMENTS = [
|
||||
'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3',
|
||||
'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span'
|
||||
];
|
||||
|
||||
const HTML5_SHADOW_DISALLOWED_ELEMENTS =
|
||||
HTML5_ELEMENTS.filter(el => !HTML5_SHADOW_ALLOWED_ELEMENTS.includes(el));
|
||||
|
||||
// These are *deprecated/removed* HTML5 element names.
|
||||
const HTML5_DEPRECATED_ELEMENTS = [
|
||||
'acronym', 'applet', 'basefont', 'bgsound', 'big', 'blink',
|
||||
'center', 'command', 'content', 'dir', 'font', 'frame',
|
||||
'frameset', 'hgroup', 'image', 'isindex', 'keygen', 'marquee',
|
||||
'menuitem', 'nobr', 'noembed', 'noframes', 'plaintext', 'rb',
|
||||
'rtc', 'shadow', 'spacer', 'strike', 'tt', 'xmp'
|
||||
];
|
||||
|
||||
const HTML5_INPUT_TYPES = [
|
||||
'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date',
|
||||
'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio',
|
||||
'file', 'submit', 'image', 'reset', 'button'
|
||||
];
|
||||
|
||||
function newDocument() {
|
||||
var d = document.implementation.createDocument();
|
||||
return d;
|
||||
}
|
||||
|
||||
function newHTMLDocument() {
|
||||
var d = document.implementation.createHTMLDocument('Test Document');
|
||||
return d;
|
||||
}
|
||||
|
||||
function newXHTMLDocument() {
|
||||
var doctype = document.implementation.createDocumentType('html',
|
||||
'-//W3C//DTD XHTML 1.0 Transitional//EN',
|
||||
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd');
|
||||
|
||||
var d = document.implementation.createDocument(
|
||||
'http://www.w3.org/1999/xhtml', 'html', doctype);
|
||||
return d;
|
||||
}
|
||||
|
||||
function newIFrame(context, src) {
|
||||
if (typeof (context) === 'undefined'
|
||||
|| typeof (context.iframes) !== 'object') {
|
||||
assert_unreached('Illegal context object in newIFrame');
|
||||
}
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
|
||||
if (typeof (src) != 'undefined') {
|
||||
iframe.src = src;
|
||||
}
|
||||
document.body.appendChild(iframe);
|
||||
context.iframes.push(iframe);
|
||||
|
||||
assert_true(typeof (iframe.contentWindow) != 'undefined'
|
||||
&& typeof (iframe.contentWindow.document) != 'undefined'
|
||||
&& iframe.contentWindow.document != document,
|
||||
'Failed to create new rendered document');
|
||||
return iframe;
|
||||
}
|
||||
|
||||
function newRenderedHTMLDocument(context) {
|
||||
var frame = newIFrame(context);
|
||||
var d = frame.contentWindow.document;
|
||||
return d;
|
||||
}
|
||||
|
||||
function newContext() {
|
||||
return {
|
||||
iframes : []
|
||||
};
|
||||
}
|
||||
|
||||
function cleanContext(context) {
|
||||
context.iframes.forEach(function(e) {
|
||||
e.parentNode.removeChild(e);
|
||||
});
|
||||
}
|
||||
|
||||
// run given test function in context
|
||||
// the context is cleaned up after test completes.
|
||||
function inContext(f) {
|
||||
return function() {
|
||||
var context = newContext();
|
||||
try {
|
||||
f(context);
|
||||
} finally {
|
||||
cleanContext(context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// new context and iframe are created and url (if supplied) is asigned to
|
||||
// iframe.src
|
||||
// function f is bound to the iframe onload event or executed directly after
|
||||
// iframe creation
|
||||
// the context is passed to function as argument
|
||||
function testInIFrame(url, f, testName, testProps) {
|
||||
if (url) {
|
||||
var t = async_test(testName);
|
||||
t.step(function() {
|
||||
var context = newContext();
|
||||
var iframe = newIFrame(context, url);
|
||||
iframe.onload = t.step_func(function() {
|
||||
try {
|
||||
f(context);
|
||||
t.done();
|
||||
} finally {
|
||||
cleanContext(context);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
test(inContext(function(context) {
|
||||
newRenderedHTMLDocument(context);
|
||||
f(context);
|
||||
}), testName);
|
||||
}
|
||||
}
|
||||
|
||||
function assert_nodelist_contents_equal_noorder(actual, expected, message) {
|
||||
assert_equals(actual.length, expected.length, message);
|
||||
var used = [];
|
||||
for ( var i = 0; i < expected.length; i++) {
|
||||
used.push(false);
|
||||
}
|
||||
for (i = 0; i < expected.length; i++) {
|
||||
var found = false;
|
||||
for ( var j = 0; j < actual.length; j++) {
|
||||
if (used[j] == false && expected[i] == actual[j]) {
|
||||
used[j] = true;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
assert_unreached(message + ". Fail reason: element not found: "
|
||||
+ expected[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isVoidElement(elementName) {
|
||||
return HTML5_VOID_ELEMENTS.indexOf(elementName) >= 0;
|
||||
}
|
||||
|
||||
function checkTemplateContent(d, obj, html, id, nodeName) {
|
||||
|
||||
obj.innerHTML = '<template id="tmpl">' + html + '</template>';
|
||||
|
||||
var t = d.querySelector('#tmpl');
|
||||
|
||||
if (id != null) {
|
||||
assert_equals(t.content.childNodes.length, 1, 'Element ' + nodeName
|
||||
+ ' should present among template nodes');
|
||||
assert_equals(t.content.firstChild.id, id, 'Wrong element ID');
|
||||
}
|
||||
if (nodeName != null) {
|
||||
assert_equals(t.content.firstChild.nodeName, nodeName.toUpperCase(),
|
||||
'Wrong node name');
|
||||
}
|
||||
}
|
||||
|
||||
function checkBodyTemplateContent(d, html, id, nodeName) {
|
||||
checkTemplateContent(d, d.body, html, id, nodeName);
|
||||
}
|
||||
|
||||
function checkHeadTemplateContent(d, html, id, nodeName) {
|
||||
checkTemplateContent(d, d.head, html, id, nodeName);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>The end: DOMContentLoaded and defer scripts</title>
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#the-end">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
var dcl;
|
||||
var t = async_test(function() {
|
||||
dcl = false;
|
||||
document.addEventListener("DOMContentLoaded", function(e) {
|
||||
dcl = true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script defer src=support/DOMContentLoaded-defer.js></script>
|
|
@ -0,0 +1,143 @@
|
|||
<!DOCTYPE html>
|
||||
<title>document.getElementsByTagName and foreign parser-inserted
|
||||
elements</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-getelementsbytagname">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<svg>
|
||||
<altglyph/>
|
||||
<altglyphdef/>
|
||||
<altglyphitem/>
|
||||
<animatecolor/>
|
||||
<animatemotion/>
|
||||
<animatetransform/>
|
||||
<clippath/>
|
||||
<feblend/>
|
||||
<fecolormatrix/>
|
||||
<fecomponenttransfer/>
|
||||
<fecomposite/>
|
||||
<feconvolvematrix/>
|
||||
<fediffuselighting/>
|
||||
<fedisplacementmap/>
|
||||
<fedistantlight/>
|
||||
<feflood/>
|
||||
<fefunca/>
|
||||
<fefuncb/>
|
||||
<fefuncg/>
|
||||
<fefuncr/>
|
||||
<fegaussianblur/>
|
||||
<feimage/>
|
||||
<femerge/>
|
||||
<femergenode/>
|
||||
<femorphology/>
|
||||
<feoffset/>
|
||||
<fepointlight/>
|
||||
<fespecularlighting/>
|
||||
<fespotlight/>
|
||||
<fetile/>
|
||||
<feturbulence/>
|
||||
<foreignobject/>
|
||||
<glyphref/>
|
||||
<lineargradient/>
|
||||
<radialgradient/>
|
||||
<textpath/>
|
||||
<ALTGLYPH/>
|
||||
<ALTGLYPHDEF/>
|
||||
<ALTGLYPHITEM/>
|
||||
<ANIMATECOLOR/>
|
||||
<ANIMATEMOTION/>
|
||||
<ANIMATETRANSFORM/>
|
||||
<CLIPPATH/>
|
||||
<FEBLEND/>
|
||||
<FECOLORMATRIX/>
|
||||
<FECOMPONENTTRANSFER/>
|
||||
<FECOMPOSITE/>
|
||||
<FECONVOLVEMATRIX/>
|
||||
<FEDIFFUSELIGHTING/>
|
||||
<FEDISPLACEMENTMAP/>
|
||||
<FEDISTANTLIGHT/>
|
||||
<FEFLOOD/>
|
||||
<FEFUNCA/>
|
||||
<FEFUNCB/>
|
||||
<FEFUNCG/>
|
||||
<FEFUNCR/>
|
||||
<FEGAUSSIANBLUR/>
|
||||
<FEIMAGE/>
|
||||
<FEMERGE/>
|
||||
<FEMERGENODE/>
|
||||
<FEMORPHOLOGY/>
|
||||
<FEOFFSET/>
|
||||
<FEPOINTLIGHT/>
|
||||
<FESPECULARLIGHTING/>
|
||||
<FESPOTLIGHT/>
|
||||
<FETILE/>
|
||||
<FETURBULENCE/>
|
||||
<FOREIGNOBJECT/>
|
||||
<GLYPHREF/>
|
||||
<LINEARGRADIENT/>
|
||||
<RADIALGRADIENT/>
|
||||
<TEXTPATH/>
|
||||
</svg>
|
||||
<script>
|
||||
var elements = [
|
||||
"altGlyph",
|
||||
"altGlyphDef",
|
||||
"altGlyphItem",
|
||||
"animateColor",
|
||||
"animateMotion",
|
||||
"animateTransform",
|
||||
"clipPath",
|
||||
"feBlend",
|
||||
"feColorMatrix",
|
||||
"feComponentTransfer",
|
||||
"feComposite",
|
||||
"feConvolveMatrix",
|
||||
"feDiffuseLighting",
|
||||
"feDisplacementMap",
|
||||
"feDistantLight",
|
||||
"feFlood",
|
||||
"feFuncA",
|
||||
"feFuncB",
|
||||
"feFuncG",
|
||||
"feFuncR",
|
||||
"feGaussianBlur",
|
||||
"feImage",
|
||||
"feMerge",
|
||||
"feMergeNode",
|
||||
"feMorphology",
|
||||
"feOffset",
|
||||
"fePointLight",
|
||||
"feSpecularLighting",
|
||||
"feSpotLight",
|
||||
"feTile",
|
||||
"feTurbulence",
|
||||
"foreignObject",
|
||||
"glyphRef",
|
||||
"linearGradient",
|
||||
"radialGradient",
|
||||
"textPath"];
|
||||
</script>
|
||||
</div>
|
||||
<script>
|
||||
var SVG = "http://www.w3.org/2000/svg";
|
||||
function t(el) {
|
||||
assert_equals(document.getElementsByTagName(el).length, 2);
|
||||
assert_equals(document.getElementsByTagName(el.toUpperCase()).length, 0);
|
||||
assert_equals(document.getElementsByTagName(el.toLowerCase()).length, 0);
|
||||
assert_equals(document.getElementsByTagNameNS(SVG, el).length, 2);
|
||||
assert_equals(document.getElementsByTagNameNS(SVG, el.toUpperCase()).length, 0);
|
||||
assert_equals(document.getElementsByTagNameNS(SVG, el.toLowerCase()).length, 0);
|
||||
}
|
||||
test(function() {
|
||||
var tests = [];
|
||||
assert_equals(document.getElementsByTagName('svg').length, 1);
|
||||
for (var i = 0, il = elements.length; i < il; ++i) {
|
||||
tests.push(["Testing " + elements[i], elements[i]]);
|
||||
}
|
||||
generate_tests(t, tests);
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<title>getElementsByTagName and font</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-getelementsbytagname">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<font></font>
|
||||
<svg><font/></svg>
|
||||
</div>
|
||||
<script>
|
||||
var HTML = "http://www.w3.org/1999/xhtml", SVG = "http://www.w3.org/2000/svg";
|
||||
test(function() {
|
||||
assert_equals(document.getElementsByTagName("FONT").length, 1);
|
||||
assert_equals(document.getElementsByTagName("FONT")[0].namespaceURI, HTML);
|
||||
}, "Upper-case font")
|
||||
test(function() {
|
||||
assert_equals(document.getElementsByTagName("font").length, 2);
|
||||
assert_equals(document.getElementsByTagName("font")[0].namespaceURI, HTML);
|
||||
assert_equals(document.getElementsByTagName("font")[1].namespaceURI, SVG);
|
||||
}, "Lower-case font")
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<title>getElementsByTagName and font</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-element-getelementsbytagname">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<font></font>
|
||||
<svg><font/></svg>
|
||||
</div>
|
||||
<script>
|
||||
var HTML = "http://www.w3.org/1999/xhtml", SVG = "http://www.w3.org/2000/svg";
|
||||
var wrapper = document.getElementById("test");
|
||||
test(function() {
|
||||
assert_equals(wrapper.getElementsByTagName("FONT").length, 1);
|
||||
assert_equals(wrapper.getElementsByTagName("FONT")[0].namespaceURI, HTML);
|
||||
}, "Upper-case font")
|
||||
test(function() {
|
||||
assert_equals(wrapper.getElementsByTagName("font").length, 2);
|
||||
assert_equals(wrapper.getElementsByTagName("font")[0].namespaceURI, HTML);
|
||||
assert_equals(wrapper.getElementsByTagName("font")[1].namespaceURI, SVG);
|
||||
}, "Lower-case font")
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<title>getElementsByTagName and font</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://dom.spec.whatwg.org/#dom-element-getelementsbytagname">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<svg id="outer">
|
||||
<foreignObject>
|
||||
<font></font>
|
||||
<svg><font/></svg>
|
||||
</foreignObject>
|
||||
</svg>
|
||||
</div>
|
||||
<script>
|
||||
var HTML = "http://www.w3.org/1999/xhtml", SVG = "http://www.w3.org/2000/svg";
|
||||
var wrapper = document.getElementById("outer");
|
||||
test(function() {
|
||||
assert_equals(wrapper.getElementsByTagName("FONT").length, 1);
|
||||
assert_equals(wrapper.getElementsByTagName("FONT")[0].namespaceURI, HTML);
|
||||
}, "Upper-case font")
|
||||
test(function() {
|
||||
assert_equals(wrapper.getElementsByTagName("font").length, 2);
|
||||
assert_equals(wrapper.getElementsByTagName("font")[0].namespaceURI, HTML);
|
||||
assert_equals(wrapper.getElementsByTagName("font")[1].namespaceURI, SVG);
|
||||
}, "Lower-case font")
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
Note: the html5lib_* files in this directory are autogenerated, as are
|
||||
the tests under speculative-parsing/.
|
||||
|
||||
To update the generated tests, run
|
||||
`wpt update-built --include html5lib speculative-parsing`.
|
||||
|
||||
The revision of html5lib-tests used to generate the tests is stored in
|
||||
html/tools/html5lib_tests_revision
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<title>The adoption agency algorithm should check the end tag's name</title>
|
||||
<link rel="author" href="mailto:n4ag3a2sh1i@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// This is a regression test for https://crbug.com/1217523.
|
||||
test(() => {
|
||||
const wrapper = document.createElement('div');
|
||||
const html = '<code some-attribute=""><div><code><code><code><code></code></code></code></code></div></code>';
|
||||
wrapper.innerHTML = html;
|
||||
assert_equals(wrapper.innerHTML, html);
|
||||
}, 'The algorithm should not reparent properly nested tags');
|
||||
|
||||
</script>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>Ambiguous ampersand</title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<div><a href='?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &'>Link</a><p>Text: ?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &</p></div>
|
||||
<script>
|
||||
var markup = "<div><a href='?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &'>Link</a><p>Text: ?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &</p></div>";
|
||||
|
||||
for (var i = 0; i < markup.length; ++i) {
|
||||
document.write(markup.charAt(i));
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function checkDiv(div, provenance) {
|
||||
test(function() {
|
||||
assert_equals(div.childNodes.length, 2, "Number of elements " + provenance);
|
||||
let a = div.firstChild;
|
||||
let href = a.href;
|
||||
let question = href.indexOf('?');
|
||||
href = href.substring(question);
|
||||
assert_equals(href, "?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=%E2%88%89%C2%AC&;&%20&", "attribute " + provenance);
|
||||
let p = a.nextSibling;
|
||||
assert_equals(p.textContent, "Text: ?a=b&c=d&a0b=c©=1¬i=n¬=in¬in=∉¬&;& &", "text " + provenance)
|
||||
}, "Check div structure: " + provenance);
|
||||
}
|
||||
|
||||
|
||||
let divs = document.getElementsByTagName("div");
|
||||
test(function() {
|
||||
assert_equals(divs.length, 2);
|
||||
}, "Check number of divs");
|
||||
checkDiv(divs[0], "network");
|
||||
checkDiv(divs[1], "document.write");
|
||||
</script>
|
|
@ -0,0 +1,24 @@
|
|||
function mark_diffs(expected, actual) {
|
||||
var expected_lines = expected.split("\n");
|
||||
var actual_lines = actual.split("\n");
|
||||
|
||||
var max_length = Math.max(expected_lines.length, actual_lines.length);
|
||||
|
||||
var expected_diff = ["code", {}];
|
||||
var actual_diff = ["code", {}];
|
||||
|
||||
for (var i=0; i<max_length; i++) {
|
||||
if (expected_lines[i] === actual_lines[i]) {
|
||||
expected_diff.push(expected_lines[i] + "\n");
|
||||
actual_diff.push(actual_lines[i] + "\n");
|
||||
} else {
|
||||
if (expected_lines[i]) {
|
||||
expected_diff.push(["span", {style:"color:red"}, expected_lines[i] + "\n"]);
|
||||
}
|
||||
if (actual_lines[i]) {
|
||||
actual_diff.push(["span", {style:"color:red"}, actual_lines[i] + "\n"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return [expected_diff, actual_diff];
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html PUBLIC "" "">
|
||||
<meta charset=utf-8>
|
||||
<title>Doctype with empty ids should trigger the standards mode.</title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<script>
|
||||
test(function () {
|
||||
assert_equals(document.compatMode, "CSS1Compat");
|
||||
}, "Doctype with empty ids should trigger the standards mode.");
|
||||
</script>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#tree-construction:html-integration-point">
|
||||
<body>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
|
||||
<math><annotation-xml id="point-1" encoding="text/html"><xmp></xmp><img></xmp></annotation-xml></math>
|
||||
<math><annotation-xml id="point-2" encoding="application/xhtml+xml"><style></style><img></style></annotation-xml></math>
|
||||
<svg><foreignObject id="point-3"><iframe></iframe><img></iframe></foreignObject></svg>
|
||||
<svg><desc id="point-4"><noembed></noembed><img></noembed></desc></svg>
|
||||
<svg><title id="point-5"><noframes></noframes><img></noframes></title></svg>
|
||||
|
||||
<script>
|
||||
function generate_test(id) {
|
||||
return () => {
|
||||
let point = document.querySelector('#' + id);
|
||||
assert_not_equals(point.namespaceURI, 'http://www.w3.org/1999/xhtml');
|
||||
let rawTextElement = point.firstChild;
|
||||
assert_equals(rawTextElement.namespaceURI, 'http://www.w3.org/1999/xhtml');
|
||||
assert_equals(rawTextElement.textContent.substr(0, 4), '<',
|
||||
'Entity references should not be decoded.');
|
||||
};
|
||||
}
|
||||
|
||||
test(generate_test('point-1'), 'MathML annotation-xml with encoding=text/html should be an HTML integration point');
|
||||
test(generate_test('point-2'), 'MathML annotation-xml with encoding=application/xhtml+xml should be an HTML integration point');
|
||||
test(generate_test('point-3'), 'SVG foreignObject should be an HTML integration point');
|
||||
test(generate_test('point-4'), 'SVG desc should be an HTML integration point');
|
||||
test(generate_test('point-5'), 'SVG title should be an HTML integration point');
|
||||
</script>
|
||||
</body>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_adoption02.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['cefc9890d621707fedf5eb634f3a86d753659d9b','2a8f569e9d55b3cb7e54b026f758dea8593f4cb4',];
|
||||
var tests = {
|
||||
"cefc9890d621707fedf5eb634f3a86d753659d9b":[async_test('html5lib_adoption02.html cefc9890d621707fedf5eb634f3a86d753659d9b'), "%3Cb%3E1%3Ci%3E2%3Cp%3E3%3C/b%3E4", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%221%22%0A%7C%20%20%20%20%20%20%20%3Ci%3E%0A%7C%20%20%20%20%20%20%20%20%20%222%22%0A%7C%20%20%20%20%20%3Ci%3E%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%223%22%0A%7C%20%20%20%20%20%20%20%20%20%224%22"],"2a8f569e9d55b3cb7e54b026f758dea8593f4cb4":[async_test('html5lib_adoption02.html 2a8f569e9d55b3cb7e54b026f758dea8593f4cb4'), "%3Ca%3E%3Cdiv%3E%3Cstyle%3E%3C/style%3E%3Caddress%3E%3Ca%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ca%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Ca%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cstyle%3E%0A%7C%20%20%20%20%20%20%20%3Caddress%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ca%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ca%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_inbody01.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['3e20aae3cbc7f10b28cbfc1e20b2949708872a3c','ec6b9d9dccaa3494a317afac0edfcc485b959663','cc4923612d10b2115cd03e269080ddf5463d95ae','a5ebf8808e479239966038951d5383ed65ff4eb6',];
|
||||
var tests = {
|
||||
"3e20aae3cbc7f10b28cbfc1e20b2949708872a3c":[async_test('html5lib_inbody01.html 3e20aae3cbc7f10b28cbfc1e20b2949708872a3c'), "%3Cbutton%3E1%3C/foo%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cbutton%3E%0A%7C%20%20%20%20%20%20%20%221%22"],"ec6b9d9dccaa3494a317afac0edfcc485b959663":[async_test('html5lib_inbody01.html ec6b9d9dccaa3494a317afac0edfcc485b959663'), "%3Cfoo%3E1%3Cp%3E2%3C/foo%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%221%22%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%222%22"],"cc4923612d10b2115cd03e269080ddf5463d95ae":[async_test('html5lib_inbody01.html cc4923612d10b2115cd03e269080ddf5463d95ae'), "%3Cdd%3E1%3C/foo%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdd%3E%0A%7C%20%20%20%20%20%20%20%221%22"],"a5ebf8808e479239966038951d5383ed65ff4eb6":[async_test('html5lib_inbody01.html a5ebf8808e479239966038951d5383ed65ff4eb6'), "%3Cfoo%3E1%3Cdd%3E2%3C/foo%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%221%22%0A%7C%20%20%20%20%20%20%20%3Cdd%3E%0A%7C%20%20%20%20%20%20%20%20%20%222%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_adoption01.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['0bf80e1546d4c221354aa9734f61713b7d64ee6d',];
|
||||
var tests = {
|
||||
"0bf80e1546d4c221354aa9734f61713b7d64ee6d":[async_test('html5lib_innerHTML_adoption01.html 0bf80e1546d4c221354aa9734f61713b7d64ee6d'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoob%3E%3Cfooc%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Cb%3E%0A%7C%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%3Cfoob%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfooc%3E%0A%7C%20%3Caside%3E%0A%7C%20%20%20%3Cb%3E", 'div'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_math.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['0e7e70d0dcf0c26593203b36cac4fa7f6325613e','fa7d4a31838dbcc16bf73672f2f4486cca185673','d9d2e4c0e926a91f5e704846cdbc855e3cb21949','c04b203803f6b3bec3db65db16854e7e624d13ef','4f95d47164955a6b163935fd8ac89ea200767330','e942ee6666e1dc938aab10fc2374a2240806b439','3537413f7f8166cb0c3a324fef8261be5628611d','c0186fb0fe26b48bcd82d58ebe0c90a423f26c28',];
|
||||
var tests = {
|
||||
"0e7e70d0dcf0c26593203b36cac4fa7f6325613e":[async_test('html5lib_innerHTML_math.html 0e7e70d0dcf0c26593203b36cac4fa7f6325613e'), "%3Cmath%3E%3Ctr%3E%3Ctd%3E%3Cmo%3E%3Ctr%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tr%3E%0A%7C%20%20%20%20%20%3Cmath%20td%3E%0A%7C%20%20%20%20%20%20%20%3Cmath%20mo%3E", 'td'],"fa7d4a31838dbcc16bf73672f2f4486cca185673":[async_test('html5lib_innerHTML_math.html fa7d4a31838dbcc16bf73672f2f4486cca185673'), "%3Cmath%3E%3Ctr%3E%3Ctd%3E%3Cmo%3E%3Ctr%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tr%3E%0A%7C%20%20%20%20%20%3Cmath%20td%3E%0A%7C%20%20%20%20%20%20%20%3Cmath%20mo%3E", 'tr'],"d9d2e4c0e926a91f5e704846cdbc855e3cb21949":[async_test('html5lib_innerHTML_math.html d9d2e4c0e926a91f5e704846cdbc855e3cb21949'), "%3Cmath%3E%3Cthead%3E%3Cmo%3E%3Ctbody%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20thead%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'thead'],"c04b203803f6b3bec3db65db16854e7e624d13ef":[async_test('html5lib_innerHTML_math.html c04b203803f6b3bec3db65db16854e7e624d13ef'), "%3Cmath%3E%3Ctfoot%3E%3Cmo%3E%3Ctbody%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tfoot%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'tfoot'],"4f95d47164955a6b163935fd8ac89ea200767330":[async_test('html5lib_innerHTML_math.html 4f95d47164955a6b163935fd8ac89ea200767330'), "%3Cmath%3E%3Ctbody%3E%3Cmo%3E%3Ctfoot%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tbody%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'tbody'],"e942ee6666e1dc938aab10fc2374a2240806b439":[async_test('html5lib_innerHTML_math.html e942ee6666e1dc938aab10fc2374a2240806b439'), "%3Cmath%3E%3Ctbody%3E%3Cmo%3E%3C/table%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tbody%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'tbody'],"3537413f7f8166cb0c3a324fef8261be5628611d":[async_test('html5lib_innerHTML_math.html 3537413f7f8166cb0c3a324fef8261be5628611d'), "%3Cmath%3E%3Cthead%3E%3Cmo%3E%3C/table%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20thead%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'tbody'],"c0186fb0fe26b48bcd82d58ebe0c90a423f26c28":[async_test('html5lib_innerHTML_math.html c0186fb0fe26b48bcd82d58ebe0c90a423f26c28'), "%3Cmath%3E%3Ctfoot%3E%3Cmo%3E%3C/table%3E", "%23document%0A%7C%20%3Cmath%20math%3E%0A%7C%20%20%20%3Cmath%20tfoot%3E%0A%7C%20%20%20%20%20%3Cmath%20mo%3E", 'tbody'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_svg.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['9de06fc8491759163a4b2a4e17015c94cab31f13','f4ffd3073d887daeb6b5d293547f3596a6bbe2b3','3abfcccd524311a4afcc0057334c8364616fd830','70fbdb7f147b21143966af3a9467f716cc314637','44994fe2eb6af6ad3511781f23bafcdd2d24692c','a148d278cbb59d5eadc1c6a5576c7887dcadb74e','f1746231c89e495dc6b9d114d6d2f52876a1f5f5','1689d7c8f41a57eb15235d337028f3fe44764349',];
|
||||
var tests = {
|
||||
"9de06fc8491759163a4b2a4e17015c94cab31f13":[async_test('html5lib_innerHTML_svg.html 9de06fc8491759163a4b2a4e17015c94cab31f13'), "%3Csvg%3E%3Ctr%3E%3Ctd%3E%3Ctitle%3E%3Ctr%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tr%3E%0A%7C%20%20%20%20%20%3Csvg%20td%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20title%3E", 'td'],"f4ffd3073d887daeb6b5d293547f3596a6bbe2b3":[async_test('html5lib_innerHTML_svg.html f4ffd3073d887daeb6b5d293547f3596a6bbe2b3'), "%3Csvg%3E%3Ctr%3E%3Ctd%3E%3Ctitle%3E%3Ctr%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tr%3E%0A%7C%20%20%20%20%20%3Csvg%20td%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20title%3E", 'tr'],"3abfcccd524311a4afcc0057334c8364616fd830":[async_test('html5lib_innerHTML_svg.html 3abfcccd524311a4afcc0057334c8364616fd830'), "%3Csvg%3E%3Cthead%3E%3Ctitle%3E%3Ctbody%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20thead%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'thead'],"70fbdb7f147b21143966af3a9467f716cc314637":[async_test('html5lib_innerHTML_svg.html 70fbdb7f147b21143966af3a9467f716cc314637'), "%3Csvg%3E%3Ctfoot%3E%3Ctitle%3E%3Ctbody%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tfoot%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'tfoot'],"44994fe2eb6af6ad3511781f23bafcdd2d24692c":[async_test('html5lib_innerHTML_svg.html 44994fe2eb6af6ad3511781f23bafcdd2d24692c'), "%3Csvg%3E%3Ctbody%3E%3Ctitle%3E%3Ctfoot%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tbody%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'tbody'],"a148d278cbb59d5eadc1c6a5576c7887dcadb74e":[async_test('html5lib_innerHTML_svg.html a148d278cbb59d5eadc1c6a5576c7887dcadb74e'), "%3Csvg%3E%3Ctbody%3E%3Ctitle%3E%3C/table%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tbody%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'tbody'],"f1746231c89e495dc6b9d114d6d2f52876a1f5f5":[async_test('html5lib_innerHTML_svg.html f1746231c89e495dc6b9d114d6d2f52876a1f5f5'), "%3Csvg%3E%3Cthead%3E%3Ctitle%3E%3C/table%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20thead%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'tbody'],"1689d7c8f41a57eb15235d337028f3fe44764349":[async_test('html5lib_innerHTML_svg.html 1689d7c8f41a57eb15235d337028f3fe44764349'), "%3Csvg%3E%3Ctfoot%3E%3Ctitle%3E%3C/table%3E", "%23document%0A%7C%20%3Csvg%20svg%3E%0A%7C%20%20%20%3Csvg%20tfoot%3E%0A%7C%20%20%20%20%20%3Csvg%20title%3E", 'tbody'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_template.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['64d3e0e4395745b6ea928e5f5cf888bf675a598b',];
|
||||
var tests = {
|
||||
"64d3e0e4395745b6ea928e5f5cf888bf675a598b":[async_test('html5lib_innerHTML_template.html 64d3e0e4395745b6ea928e5f5cf888bf675a598b'), "%3Ctemplate%3E%3Cform%3E%3Cinput%20name%3D%22q%22%3E%3C/form%3E%3Cdiv%3Esecond%3C/div%3E%3C/template%3E", "%23document%0A%7C%20%3Ctemplate%3E%0A%7C%20%20%20content%0A%7C%20%20%20%20%20%3Cform%3E%0A%7C%20%20%20%20%20%20%20%3Cinput%3E%0A%7C%20%20%20%20%20%20%20%20%20name%3D%22q%22%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22second%22", 'template'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_tests4.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['8c692a23f8c9b5860cf06fb334041d2e97e96f5c','95cb768746a1ca7ac02d39c0bb2b10d9e965e37c','06bd3583493359d112d19765f68fac3901267408','48d8375ef2d9d73bd133f2947858a3450a988d53','36fb2178fbdfa1b32701a9d9214c3fd115fd7184','d373bc3abdda01b17a6055af21b16c151dd1d697','4f91b1d4c6e2bbc0595c9effc490b7357e9cefc2','38b248763fb49ca6c1abc2f2f9d9e502c5ed5041','054c57cdb4b945b7273a4627a68f470705640e3e',];
|
||||
var tests = {
|
||||
"8c692a23f8c9b5860cf06fb334041d2e97e96f5c":[async_test('html5lib_innerHTML_tests4.html 8c692a23f8c9b5860cf06fb334041d2e97e96f5c'), "direct%20div%20content", "%23document%0A%7C%20%22direct%20div%20content%22", 'div'],"95cb768746a1ca7ac02d39c0bb2b10d9e965e37c":[async_test('html5lib_innerHTML_tests4.html 95cb768746a1ca7ac02d39c0bb2b10d9e965e37c'), "direct%20textarea%20content", "%23document%0A%7C%20%22direct%20textarea%20content%22", 'textarea'],"06bd3583493359d112d19765f68fac3901267408":[async_test('html5lib_innerHTML_tests4.html 06bd3583493359d112d19765f68fac3901267408'), "textarea%20content%20with%20%3Cem%3Epseudo%3C/em%3E%20%3Cfoo%3Emarkup", "%23document%0A%7C%20%22textarea%20content%20with%20%3Cem%3Epseudo%3C/em%3E%20%3Cfoo%3Emarkup%22", 'textarea'],"48d8375ef2d9d73bd133f2947858a3450a988d53":[async_test('html5lib_innerHTML_tests4.html 48d8375ef2d9d73bd133f2947858a3450a988d53'), "this%20is%20%26%23x0043%3BDATA%20inside%20a%20%3Cstyle%3E%20element", "%23document%0A%7C%20%22this%20is%20%26%23x0043%3BDATA%20inside%20a%20%3Cstyle%3E%20element%22", 'style'],"36fb2178fbdfa1b32701a9d9214c3fd115fd7184":[async_test('html5lib_innerHTML_tests4.html 36fb2178fbdfa1b32701a9d9214c3fd115fd7184'), "%3C/plaintext%3E", "%23document%0A%7C%20%22%3C/plaintext%3E%22", 'plaintext'],"d373bc3abdda01b17a6055af21b16c151dd1d697":[async_test('html5lib_innerHTML_tests4.html d373bc3abdda01b17a6055af21b16c151dd1d697'), "setting%20html%27s%20innerHTML", "%23document%0A%7C%20%3Chead%3E%0A%7C%20%3Cbody%3E%0A%7C%20%20%20%22setting%20html%27s%20innerHTML%22", 'html'],"4f91b1d4c6e2bbc0595c9effc490b7357e9cefc2":[async_test('html5lib_innerHTML_tests4.html 4f91b1d4c6e2bbc0595c9effc490b7357e9cefc2'), "%3Ctitle%3Esetting%20head%27s%20innerHTML%3C/title%3E", "%23document%0A%7C%20%3Ctitle%3E%0A%7C%20%20%20%22setting%20head%27s%20innerHTML%22", 'head'],"38b248763fb49ca6c1abc2f2f9d9e502c5ed5041":[async_test('html5lib_innerHTML_tests4.html 38b248763fb49ca6c1abc2f2f9d9e502c5ed5041'), "direct%20%3Ctitle%3E%20content", "%23document%0A%7C%20%22direct%20%3Ctitle%3E%20content%22", 'title'],"054c57cdb4b945b7273a4627a68f470705640e3e":[async_test('html5lib_innerHTML_tests4.html 054c57cdb4b945b7273a4627a68f470705640e3e'), "%3C%21--%20inside%20%3C/script%3E%20--%3E", "%23document%0A%7C%20%22%3C%21--%20inside%20%3C/script%3E%20--%3E%22", 'script'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_tests6.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['ccb245e2f1d9fe1580235854daa1a124525aca61','ed2b0f8fe477e3a6a0d9052b46bd94e628fb666a','ed4acc4544b7ee83072a3c2ae078e3cbaf8303fb','28f111cdfb84bfa4a70b57e3aeec1f0aa13337de','616bd17e481973f9fe286aa30727ee22850fc31e','1cfb3baf2ad29109ddd5581daa3a009029c71491','98ba377bacd2ec343919bdc589116eabf94402d5','7cf2db8c65b79da98e39b13772ed0440ff177fd7','cb78efe1d4f4279be6c0a363cce643b3591efdc5','82911b0551c00e9971dd1491f8f2d2782aa3ac63','a3ff1f1809e8018b725620f1d04b6ebb24fda9a4','e35e330f7eb5bb27df1fe702843747e104a193be','c1dc3add1fcb1f506ea395691a710eb8e727b123',];
|
||||
var tests = {
|
||||
"ccb245e2f1d9fe1580235854daa1a124525aca61":[async_test('html5lib_innerHTML_tests6.html ccb245e2f1d9fe1580235854daa1a124525aca61'), "%3Cbody%3E%0A%3Cdiv%3E", "%23document%0A%7C%20%22%0A%22%0A%7C%20%3Cdiv%3E", 'div'],"ed2b0f8fe477e3a6a0d9052b46bd94e628fb666a":[async_test('html5lib_innerHTML_tests6.html ed2b0f8fe477e3a6a0d9052b46bd94e628fb666a'), "%3C/caption%3E%3Cdiv%3E", "%23document%0A%7C%20%3Cdiv%3E", 'caption'],"ed4acc4544b7ee83072a3c2ae078e3cbaf8303fb":[async_test('html5lib_innerHTML_tests6.html ed4acc4544b7ee83072a3c2ae078e3cbaf8303fb'), "%3C/table%3E%3Cdiv%3E", "%23document%0A%7C%20%3Cdiv%3E", 'caption'],"28f111cdfb84bfa4a70b57e3aeec1f0aa13337de":[async_test('html5lib_innerHTML_tests6.html 28f111cdfb84bfa4a70b57e3aeec1f0aa13337de'), "%3C/table%3E%3C/tbody%3E%3C/tfoot%3E%3C/thead%3E%3C/tr%3E%3Cdiv%3E", "%23document%0A%7C%20%3Cdiv%3E", 'td'],"616bd17e481973f9fe286aa30727ee22850fc31e":[async_test('html5lib_innerHTML_tests6.html 616bd17e481973f9fe286aa30727ee22850fc31e'), "foo%3Ccol%3E", "%23document%0A%7C%20%3Ccol%3E", 'colgroup'],"1cfb3baf2ad29109ddd5581daa3a009029c71491":[async_test('html5lib_innerHTML_tests6.html 1cfb3baf2ad29109ddd5581daa3a009029c71491'), "%3C/frameset%3E%3Cframe%3E", "%23document%0A%7C%20%3Cframe%3E", 'frameset'],"98ba377bacd2ec343919bdc589116eabf94402d5":[async_test('html5lib_innerHTML_tests6.html 98ba377bacd2ec343919bdc589116eabf94402d5'), "%3C/body%3E%3Cdiv%3E", "%23document%0A%7C%20%3Cdiv%3E", 'body'],"7cf2db8c65b79da98e39b13772ed0440ff177fd7":[async_test('html5lib_innerHTML_tests6.html 7cf2db8c65b79da98e39b13772ed0440ff177fd7'), "%3C/tr%3E%3Ctd%3E", "%23document%0A%7C%20%3Ctd%3E", 'tr'],"cb78efe1d4f4279be6c0a363cce643b3591efdc5":[async_test('html5lib_innerHTML_tests6.html cb78efe1d4f4279be6c0a363cce643b3591efdc5'), "%3C/tbody%3E%3C/tfoot%3E%3C/thead%3E%3Ctd%3E", "%23document%0A%7C%20%3Ctd%3E", 'tr'],"82911b0551c00e9971dd1491f8f2d2782aa3ac63":[async_test('html5lib_innerHTML_tests6.html 82911b0551c00e9971dd1491f8f2d2782aa3ac63'), "%3Ccaption%3E%3Ccol%3E%3Ccolgroup%3E%3Ctbody%3E%3Ctfoot%3E%3Cthead%3E%3Ctr%3E", "%23document%0A%7C%20%3Ctr%3E", 'tbody'],"a3ff1f1809e8018b725620f1d04b6ebb24fda9a4":[async_test('html5lib_innerHTML_tests6.html a3ff1f1809e8018b725620f1d04b6ebb24fda9a4'), "%3C/table%3E%3Ctr%3E", "%23document%0A%7C%20%3Ctr%3E", 'tbody'],"e35e330f7eb5bb27df1fe702843747e104a193be":[async_test('html5lib_innerHTML_tests6.html e35e330f7eb5bb27df1fe702843747e104a193be'), "%3C/table%3E%3Ctr%3E", "%23document%0A%7C%20%3Ctbody%3E%0A%7C%20%20%20%3Ctr%3E", 'table'],"c1dc3add1fcb1f506ea395691a710eb8e727b123":[async_test('html5lib_innerHTML_tests6.html c1dc3add1fcb1f506ea395691a710eb8e727b123'), "%3Cbody%3E%3C/body%3E%3C/html%3E", "%23document%0A%7C%20%3Chead%3E%0A%7C%20%3Cbody%3E", 'html'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_tests7.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['7aabda442dc7b37110c3d03b1465fa893dc25625',];
|
||||
var tests = {
|
||||
"7aabda442dc7b37110c3d03b1465fa893dc25625":[async_test('html5lib_innerHTML_tests7.html 7aabda442dc7b37110c3d03b1465fa893dc25625'), "%3Cbody%3EX%3C/body%3E%3C/body%3E", "%23document%0A%7C%20%3Chead%3E%0A%7C%20%3Cbody%3E%0A%7C%20%20%20%22X%22", 'html'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_innerHTML_webkit02.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['cac5528d0cbea4d15babba38304646e3903324a6','bafeef55f21b568ab89a91082464614e4ebe7c2f','9461cfc6d9d4f08b05b3a95bbe5baa264f868a44','c2c4647447354abc154f1917a7fbefa4a679d5fb',];
|
||||
var tests = {
|
||||
"cac5528d0cbea4d15babba38304646e3903324a6":[async_test('html5lib_innerHTML_webkit02.html cac5528d0cbea4d15babba38304646e3903324a6'), "%3Cb%3E%3Cem%3E%3Cdcell%3E%3Cpostfield%3E%3Cpostfield%3E%3Cpostfield%3E%3Cpostfield%3E%3Cmissing_glyph%3E%3Cmissing_glyph%3E%3Cmissing_glyph%3E%3Cmissing_glyph%3E%3Chkern%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Cb%3E%0A%7C%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Cdcell%3E%0A%7C%20%20%20%20%20%20%20%3Cpostfield%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cpostfield%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cpostfield%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpostfield%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmissing_glyph%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmissing_glyph%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmissing_glyph%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cmissing_glyph%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chkern%3E%0A%7C%20%3Caside%3E%0A%7C%20%20%20%3Cb%3E", 'div'],"bafeef55f21b568ab89a91082464614e4ebe7c2f":[async_test('html5lib_innerHTML_webkit02.html bafeef55f21b568ab89a91082464614e4ebe7c2f'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Cb%3E%0A%7C%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%3Caside%3E%0A%7C%20%20%20%3Cb%3E", 'div'],"9461cfc6d9d4f08b05b3a95bbe5baa264f868a44":[async_test('html5lib_innerHTML_webkit02.html 9461cfc6d9d4f08b05b3a95bbe5baa264f868a44'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoob%3E%3Cfoob%3E%3Cfoob%3E%3Cfoob%3E%3Cfooc%3E%3Cfooc%3E%3Cfooc%3E%3Cfooc%3E%3Cfood%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Cb%3E%0A%7C%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%3Cfoob%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoob%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoob%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoob%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfooc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfooc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfooc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfooc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfood%3E%0A%7C%20%3Caside%3E%0A%7C%20%20%20%3Cb%3E", 'div'],"c2c4647447354abc154f1917a7fbefa4a679d5fb":[async_test('html5lib_innerHTML_webkit02.html c2c4647447354abc154f1917a7fbefa4a679d5fb'), "%3Coption%3E%3CXH%3Coptgroup%3E%3C/optgroup%3E", "%23document%0A%7C%20%3Coption%3E", 'select'],
|
||||
}
|
||||
init_tests("innerHTML");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_isindex.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['579ca96e69c47b3d2ac83f1aa79a450b745d21f3','cb91f67071d81dd18d7ba9990de8f0f845c375f0','bd8ac64cc8f1422fac94bbe1c8828c0b51dca3f2','4303a393c6933743460836cb5e7dd29ca7fd6f43',];
|
||||
var tests = {
|
||||
"579ca96e69c47b3d2ac83f1aa79a450b745d21f3":[async_test('html5lib_isindex.html 579ca96e69c47b3d2ac83f1aa79a450b745d21f3'), "%3Cisindex%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cisindex%3E"],"cb91f67071d81dd18d7ba9990de8f0f845c375f0":[async_test('html5lib_isindex.html cb91f67071d81dd18d7ba9990de8f0f845c375f0'), "%3Cisindex%20name%3D%22A%22%20action%3D%22B%22%20prompt%3D%22C%22%20foo%3D%22D%22%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cisindex%3E%0A%7C%20%20%20%20%20%20%20action%3D%22B%22%0A%7C%20%20%20%20%20%20%20foo%3D%22D%22%0A%7C%20%20%20%20%20%20%20name%3D%22A%22%0A%7C%20%20%20%20%20%20%20prompt%3D%22C%22"],"bd8ac64cc8f1422fac94bbe1c8828c0b51dca3f2":[async_test('html5lib_isindex.html bd8ac64cc8f1422fac94bbe1c8828c0b51dca3f2'), "%3Cform%3E%3Cisindex%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cform%3E%0A%7C%20%20%20%20%20%20%20%3Cisindex%3E"],"4303a393c6933743460836cb5e7dd29ca7fd6f43":[async_test('html5lib_isindex.html 4303a393c6933743460836cb5e7dd29ca7fd6f43'), "%3C%21doctype%20html%3E%3Cisindex%3Ex%3C/isindex%3Ex", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cisindex%3E%0A%7C%20%20%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%22x%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_main-element.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['336a047fbc84b86dfd4baea5881b50fe0cdb5ce8','fc887f078ddc2723261a7dfb25829efe2da284f2','ebd10973e73d3a339bdf22f8bbac2f028044e096',];
|
||||
var tests = {
|
||||
"336a047fbc84b86dfd4baea5881b50fe0cdb5ce8":[async_test('html5lib_main-element.html 336a047fbc84b86dfd4baea5881b50fe0cdb5ce8'), "%3C%21doctype%20html%3E%3Cp%3Efoo%3Cmain%3Ebar%3Cp%3Ebaz", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Cmain%3E%0A%7C%20%20%20%20%20%20%20%22bar%22%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22baz%22"],"fc887f078ddc2723261a7dfb25829efe2da284f2":[async_test('html5lib_main-element.html fc887f078ddc2723261a7dfb25829efe2da284f2'), "%3C%21doctype%20html%3E%3Cmain%3E%3Cp%3Efoo%3C/main%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cmain%3E%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%22bar%22"],"ebd10973e73d3a339bdf22f8bbac2f028044e096":[async_test('html5lib_main-element.html ebd10973e73d3a339bdf22f8bbac2f028044e096'), "%3C%21DOCTYPE%20html%3Exxx%3Csvg%3E%3Cx%3E%3Cg%3E%3Ca%3E%3Cmain%3E%3Cb%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22xxx%22%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20x%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20a%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20main%3E%0A%7C%20%20%20%20%20%3Cb%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_namespace-sensitivity.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['de0a2051123e97a540e3aeb58375103bda021122',];
|
||||
var tests = {
|
||||
"de0a2051123e97a540e3aeb58375103bda021122":[async_test('html5lib_namespace-sensitivity.html de0a2051123e97a540e3aeb58375103bda021122'), "%3Cbody%3E%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Csvg%3E%3Ctd%3E%3CforeignObject%3E%3Cspan%3E%3C/td%3EFoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22Foo%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20td%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cspan%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_pending-spec-changes-plain-text-unsafe.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['8afa8d082dc447be5cab2eeb3e13efb07ec72aa6',];
|
||||
var tests = {
|
||||
"8afa8d082dc447be5cab2eeb3e13efb07ec72aa6":[async_test('html5lib_pending-spec-changes-plain-text-unsafe.html 8afa8d082dc447be5cab2eeb3e13efb07ec72aa6'), "%3Cbody%3E%3Ctable%3E%00filler%00text%00", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22fillertext%22%0A%7C%20%20%20%20%20%3Ctable%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_pending-spec-changes.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['965e062f9d01c4334cb12637e84dcbf438d38faf','8772d25919914a17118b2105e126aaa5bc83f92c','9804e9659cd045f199d9f58ef85c2639724359aa',];
|
||||
var tests = {
|
||||
"965e062f9d01c4334cb12637e84dcbf438d38faf":[async_test('html5lib_pending-spec-changes.html 965e062f9d01c4334cb12637e84dcbf438d38faf'), "%3Cinput%20type%3D%22hidden%22%3E%3Cframeset%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cframeset%3E"],"8772d25919914a17118b2105e126aaa5bc83f92c":[async_test('html5lib_pending-spec-changes.html 8772d25919914a17118b2105e126aaa5bc83f92c'), "%3C%21DOCTYPE%20html%3E%3Ctable%3E%3Ccaption%3E%3Csvg%3Efoo%3C/table%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ccaption%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%22bar%22"],"9804e9659cd045f199d9f58ef85c2639724359aa":[async_test('html5lib_pending-spec-changes.html 9804e9659cd045f199d9f58ef85c2639724359aa'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Csvg%3E%3Cdesc%3E%3Ctd%3E%3C/desc%3E%3Ccircle%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20desc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ccircle%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_quirks01.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['700e38ecb6ac91e9c5477fd451591b844d51f38e','d196aec77885a47ff43166960d48c8c9eb2cbee0','d4b597fe74a7af1b96750e29cb1180af8b97a1f4','e1bacd20039e6d1bed0de4aff51c37e303762170',];
|
||||
var tests = {
|
||||
"700e38ecb6ac91e9c5477fd451591b844d51f38e":[async_test('html5lib_quirks01.html 700e38ecb6ac91e9c5477fd451591b844d51f38e'), "%3C%21DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.0%20Frameset//EN%22%0A%22http%3A//www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd%22%3E%3Cp%3E%3Ctable%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%20%22-//W3C//DTD%20XHTML%201.0%20Frameset//EN%22%20%22http%3A//www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd%22%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"d196aec77885a47ff43166960d48c8c9eb2cbee0":[async_test('html5lib_quirks01.html d196aec77885a47ff43166960d48c8c9eb2cbee0'), "%3C%21DOCTYPE%20html%20SYSTEM%20%22http%3A//www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd%22%3E%3Cp%3E%3Ctable%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%20%22%22%20%22http%3A//www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd%22%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Ctable%3E"],"d4b597fe74a7af1b96750e29cb1180af8b97a1f4":[async_test('html5lib_quirks01.html d4b597fe74a7af1b96750e29cb1180af8b97a1f4'), "%3C%21DOCTYPE%20html%20PUBLIC%20%22html%22%3E%3Cp%3E%3Ctable%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%20%22html%22%20%22%22%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Ctable%3E"],"e1bacd20039e6d1bed0de4aff51c37e303762170":[async_test('html5lib_quirks01.html e1bacd20039e6d1bed0de4aff51c37e303762170'), "%3C%21DOCTYPE%20HTML%20PUBLIC%20%22-//W3C//DTD%20HTML%203.2//EN%22%0A%20%20%20%22http%3A//www.w3.org/TR/html4/strict.dtd%22%3E%3Cp%3E%3Ctable%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%20%22-//W3C//DTD%20HTML%203.2//EN%22%20%22http%3A//www.w3.org/TR/html4/strict.dtd%22%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Ctable%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_scripted_adoption01.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['8970fe21b551a270aa74648bb2e8b905edb54522',];
|
||||
var tests = {
|
||||
"8970fe21b551a270aa74648bb2e8b905edb54522":[async_test('html5lib_scripted_adoption01.html 8970fe21b551a270aa74648bb2e8b905edb54522'), "%3Cp%3E%3Cb%20id%3D%22A%22%3E%3Cscript%3Edocument.getElementById%28%22A%22%29.id%20%3D%20%22B%22%3C/script%3E%3C/p%3ETEXT%3C/b%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%20%20id%3D%22B%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22document.getElementById%28%22A%22%29.id%20%3D%20%22B%22%22%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20id%3D%22A%22%0A%7C%20%20%20%20%20%20%20%22TEXT%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_scripted_ark.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['b9a7cd0310cab4fd4eb77aed9149b966918e7ca2',];
|
||||
var tests = {
|
||||
"b9a7cd0310cab4fd4eb77aed9149b966918e7ca2":[async_test('html5lib_scripted_ark.html b9a7cd0310cab4fd4eb77aed9149b966918e7ca2'), "%3Cp%3E%3Cfont%20size%3D4%3E%3Cfont%20size%3D4%3E%3Cfont%20size%3D4%3E%3Cscript%3Edocument.getElementsByTagName%28%22font%22%29%5B2%5D.setAttribute%28%22size%22%2C%20%225%22%29%3B%3C/script%3E%3Cfont%20size%3D4%3E%3Cp%3EX", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20size%3D%225%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22document.getElementsByTagName%28%22font%22%29%5B2%5D.setAttribute%28%22size%22%2C%20%225%22%29%3B%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfont%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20size%3D%224%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22X%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_scripted_webkit01.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['3ff6ec1125852c7933bf6d89ecb375354e6e1b40','46ae362de712eb9c55916de93110299dbbcb5726',];
|
||||
var tests = {
|
||||
"3ff6ec1125852c7933bf6d89ecb375354e6e1b40":[async_test('html5lib_scripted_webkit01.html 3ff6ec1125852c7933bf6d89ecb375354e6e1b40'), "1%3Cscript%3Edocument.write%28%222%22%29%3C/script%3E3", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%221%22%0A%7C%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%22document.write%28%222%22%29%22%0A%7C%20%20%20%20%20%2223%22"],"46ae362de712eb9c55916de93110299dbbcb5726":[async_test('html5lib_scripted_webkit01.html 46ae362de712eb9c55916de93110299dbbcb5726'), "1%3Cscript%3Edocument.write%28%22%3Cscript%3Edocument.write%28%272%27%29%3C/scr%22%2B%20%22ipt%3E%3Cscript%3Edocument.write%28%273%27%29%3C/scr%22%20%2B%20%22ipt%3E%22%29%3C/script%3E4", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%221%22%0A%7C%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%22document.write%28%22%3Cscript%3Edocument.write%28%272%27%29%3C/scr%22%2B%20%22ipt%3E%3Cscript%3Edocument.write%28%273%27%29%3C/scr%22%20%2B%20%22ipt%3E%22%29%22%0A%7C%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%22document.write%28%272%27%29%22%0A%7C%20%20%20%20%20%222%22%0A%7C%20%20%20%20%20%3Cscript%3E%0A%7C%20%20%20%20%20%20%20%22document.write%28%273%27%29%22%0A%7C%20%20%20%20%20%2234%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_search-element.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['114b9f3c8147c0ed8ef3ed1811a9da3f10d74402','2204afb9037ec886f428ab5dcead5ee9f87c65cb','5153f797fbb63a23a40d19e298aca06d53d22f7f',];
|
||||
var tests = {
|
||||
"114b9f3c8147c0ed8ef3ed1811a9da3f10d74402":[async_test('html5lib_search-element.html 114b9f3c8147c0ed8ef3ed1811a9da3f10d74402'), "%3C%21doctype%20html%3E%3Cp%3Efoo%3Csearch%3Ebar%3Cp%3Ebaz", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Csearch%3E%0A%7C%20%20%20%20%20%20%20%22bar%22%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22baz%22"],"2204afb9037ec886f428ab5dcead5ee9f87c65cb":[async_test('html5lib_search-element.html 2204afb9037ec886f428ab5dcead5ee9f87c65cb'), "%3C%21doctype%20html%3E%3Csearch%3E%3Cp%3Efoo%3C/search%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csearch%3E%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%22bar%22"],"5153f797fbb63a23a40d19e298aca06d53d22f7f":[async_test('html5lib_search-element.html 5153f797fbb63a23a40d19e298aca06d53d22f7f'), "%3C%21DOCTYPE%20html%3Exxx%3Csvg%3E%3Cx%3E%3Cg%3E%3Ca%3E%3Csearch%3E%3Cb%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22xxx%22%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20x%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20a%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20search%3E%0A%7C%20%20%20%20%20%3Cb%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_tests12.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['95751b82f57d4feaaf06d208d57b7f6cc4d5fef5','411c792cef85cbb029d5c91f4a2142751a319bc2',];
|
||||
var tests = {
|
||||
"95751b82f57d4feaaf06d208d57b7f6cc4d5fef5":[async_test('html5lib_tests12.html 95751b82f57d4feaaf06d208d57b7f6cc4d5fef5'), "%3C%21DOCTYPE%20html%3E%3Cbody%3E%3Cp%3Efoo%3Cmath%3E%3Cmtext%3E%3Ci%3Ebaz%3C/i%3E%3C/mtext%3E%3Cannotation-xml%3E%3Csvg%3E%3Cdesc%3E%3Cb%3Eeggs%3C/b%3E%3C/desc%3E%3Cg%3E%3CforeignObject%3E%3CP%3Espam%3CTABLE%3E%3Ctr%3E%3Ctd%3E%3Cimg%3E%3C/td%3E%3C/table%3E%3C/foreignObject%3E%3C/g%3E%3Cg%3Equux%3C/g%3E%3C/svg%3E%3C/annotation-xml%3E%3C/math%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cmath%20mtext%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ci%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22baz%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cmath%20annotation-xml%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20desc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22eggs%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22spam%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cimg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22quux%22%0A%7C%20%20%20%20%20%20%20%22bar%22"],"411c792cef85cbb029d5c91f4a2142751a319bc2":[async_test('html5lib_tests12.html 411c792cef85cbb029d5c91f4a2142751a319bc2'), "%3C%21DOCTYPE%20html%3E%3Cbody%3Efoo%3Cmath%3E%3Cmtext%3E%3Ci%3Ebaz%3C/i%3E%3C/mtext%3E%3Cannotation-xml%3E%3Csvg%3E%3Cdesc%3E%3Cb%3Eeggs%3C/b%3E%3C/desc%3E%3Cg%3E%3CforeignObject%3E%3CP%3Espam%3CTABLE%3E%3Ctr%3E%3Ctd%3E%3Cimg%3E%3C/td%3E%3C/table%3E%3C/foreignObject%3E%3C/g%3E%3Cg%3Equux%3C/g%3E%3C/svg%3E%3C/annotation-xml%3E%3C/math%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20%3Cmath%20mtext%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ci%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22baz%22%0A%7C%20%20%20%20%20%20%20%3Cmath%20annotation-xml%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20desc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22eggs%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22spam%22%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cimg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22quux%22%0A%7C%20%20%20%20%20%22bar%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_tests14.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['d0faa36cd34bbc8e41bacd676e995aef68cb8ef7','9d97df65d72e97363840684da4e164b50c4bf1cb','c5de9372cd188bc22d40d4ad08eb6f787ab521ea','d16e1c0655b2086c1bd995cf6f1c5c7106e48ef0','383a71bb62eacf93dcb2399c7dd7419d92a91899','ee5e2e4a3346d225907f27c1f12b3cb2e77c32c4','cd557ae48cd48356c367e470927d0fc108724409',];
|
||||
var tests = {
|
||||
"d0faa36cd34bbc8e41bacd676e995aef68cb8ef7":[async_test('html5lib_tests14.html d0faa36cd34bbc8e41bacd676e995aef68cb8ef7'), "%3C%21DOCTYPE%20html%3E%3Chtml%3E%3Cbody%3E%3Cxyz%3Aabc%3E%3C/xyz%3Aabc%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cxyz%3Aabc%3E"],"9d97df65d72e97363840684da4e164b50c4bf1cb":[async_test('html5lib_tests14.html 9d97df65d72e97363840684da4e164b50c4bf1cb'), "%3C%21DOCTYPE%20html%3E%3Chtml%3E%3Cbody%3E%3Cxyz%3Aabc%3E%3C/xyz%3Aabc%3E%3Cspan%3E%3C/span%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cxyz%3Aabc%3E%0A%7C%20%20%20%20%20%3Cspan%3E"],"c5de9372cd188bc22d40d4ad08eb6f787ab521ea":[async_test('html5lib_tests14.html c5de9372cd188bc22d40d4ad08eb6f787ab521ea'), "%3C%21DOCTYPE%20html%3E%3Chtml%3E%3Chtml%20abc%3Adef%3Dgh%3E%3Cxyz%3Aabc%3E%3C/xyz%3Aabc%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20abc%3Adef%3D%22gh%22%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cxyz%3Aabc%3E"],"d16e1c0655b2086c1bd995cf6f1c5c7106e48ef0":[async_test('html5lib_tests14.html d16e1c0655b2086c1bd995cf6f1c5c7106e48ef0'), "%3C%21DOCTYPE%20html%3E%3Chtml%20xml%3Alang%3Dbar%3E%3Chtml%20xml%3Alang%3Dfoo%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20xml%3Alang%3D%22bar%22%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E"],"383a71bb62eacf93dcb2399c7dd7419d92a91899":[async_test('html5lib_tests14.html 383a71bb62eacf93dcb2399c7dd7419d92a91899'), "%3C%21DOCTYPE%20html%3E%3Chtml%20123%3D456%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20123%3D%22456%22%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E"],"ee5e2e4a3346d225907f27c1f12b3cb2e77c32c4":[async_test('html5lib_tests14.html ee5e2e4a3346d225907f27c1f12b3cb2e77c32c4'), "%3C%21DOCTYPE%20html%3E%3Chtml%20123%3D456%3E%3Chtml%20789%3D012%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20123%3D%22456%22%0A%7C%20%20%20789%3D%22012%22%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E"],"cd557ae48cd48356c367e470927d0fc108724409":[async_test('html5lib_tests14.html cd557ae48cd48356c367e470927d0fc108724409'), "%3C%21DOCTYPE%20html%3E%3Chtml%3E%3Cbody%20789%3D012%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20789%3D%22012%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_tests24.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['692c2dbacf18cb758f26a3d9e7d9add4356f9067','614cc9827d3a0c5f91863dde5281dd0d97f64e6d','c517924583ee71b8e684c9ca1f2eed5e88139a39','140a82fab878c139b388d159c511eb999fe2d8c7','a2ddddcccb652a6529daafd4153a0e12b6d5ca8c','da2e30a0b6577b608bf48bbd11a16ff832bc7e46','66a5777f5453bd4b5161f00df02883b6d71f7cea','c8d97f31b70f67005eeacc3c86ac29e577c3d0ed',];
|
||||
var tests = {
|
||||
"692c2dbacf18cb758f26a3d9e7d9add4356f9067":[async_test('html5lib_tests24.html 692c2dbacf18cb758f26a3d9e7d9add4356f9067'), "%3C%21DOCTYPE%20html%3E%26NotEqualTilde%3B", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%89%82%CC%B8%22"],"614cc9827d3a0c5f91863dde5281dd0d97f64e6d":[async_test('html5lib_tests24.html 614cc9827d3a0c5f91863dde5281dd0d97f64e6d'), "%3C%21DOCTYPE%20html%3E%26NotEqualTilde%3BA", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%89%82%CC%B8A%22"],"c517924583ee71b8e684c9ca1f2eed5e88139a39":[async_test('html5lib_tests24.html c517924583ee71b8e684c9ca1f2eed5e88139a39'), "%3C%21DOCTYPE%20html%3E%26ThickSpace%3B", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%81%9F%E2%80%8A%22"],"140a82fab878c139b388d159c511eb999fe2d8c7":[async_test('html5lib_tests24.html 140a82fab878c139b388d159c511eb999fe2d8c7'), "%3C%21DOCTYPE%20html%3E%26ThickSpace%3BA", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%81%9F%E2%80%8AA%22"],"a2ddddcccb652a6529daafd4153a0e12b6d5ca8c":[async_test('html5lib_tests24.html a2ddddcccb652a6529daafd4153a0e12b6d5ca8c'), "%3C%21DOCTYPE%20html%3E%26NotSubset%3B", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%8A%82%E2%83%92%22"],"da2e30a0b6577b608bf48bbd11a16ff832bc7e46":[async_test('html5lib_tests24.html da2e30a0b6577b608bf48bbd11a16ff832bc7e46'), "%3C%21DOCTYPE%20html%3E%26NotSubset%3BA", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%E2%8A%82%E2%83%92A%22"],"66a5777f5453bd4b5161f00df02883b6d71f7cea":[async_test('html5lib_tests24.html 66a5777f5453bd4b5161f00df02883b6d71f7cea'), "%3C%21DOCTYPE%20html%3E%26Gopf%3B", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%F0%9D%94%BE%22"],"c8d97f31b70f67005eeacc3c86ac29e577c3d0ed":[async_test('html5lib_tests24.html c8d97f31b70f67005eeacc3c86ac29e577c3d0ed'), "%3C%21DOCTYPE%20html%3E%26Gopf%3BA", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22%F0%9D%94%BEA%22"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8">
|
||||
<title>HTML 5 Parser tests html5lib_tests8.html</title>
|
||||
<meta name="timeout" content="long">
|
||||
<meta name="variant" content="?run_type=uri">
|
||||
<meta name="variant" content="?run_type=write">
|
||||
<meta name="variant" content="?run_type=write_single">
|
||||
</head>
|
||||
<body>
|
||||
<h1>html5lib Parser Test</h1>
|
||||
<div id="log"></div>
|
||||
<script src="common.js"></script>
|
||||
<script src="test.js"></script>
|
||||
<script src="template.js"></script>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
var num_iframes = 8;
|
||||
var order = ['5097f2cd0124cf5a23c7ccbe25f71a06966503df','0e11d51b0f71098caaccd166c368918c93683a7c','5c8ec9b2d6f03c2e971dc192897f3fcff92e5a32','a1fe2c2debb936fc1bf663f0d7228eb509522467','dbd09e012016b52703ab081360265d3bf96f3c76','bf7c4a4a4872a47746e3e26a2e57394352514c2a','a57d838264ec0d79c8b0c3cb1feb5cb941c0084d','263ff1438ee785d081669eea0fa110cca1d0d590','1ace730a87644923b11aa89e4e472cc5dd91edb7','26454c08b0d791754bf2f94fbee62624cae5fa5c',];
|
||||
var tests = {
|
||||
"5097f2cd0124cf5a23c7ccbe25f71a06966503df":[async_test('html5lib_tests8.html 5097f2cd0124cf5a23c7ccbe25f71a06966503df'), "%3Cdiv%3E%0A%3Cdiv%3E%3C/div%3E%0A%3C/span%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22%0A%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22%0Ax%22"],"0e11d51b0f71098caaccd166c368918c93683a7c":[async_test('html5lib_tests8.html 0e11d51b0f71098caaccd166c368918c93683a7c'), "%3Cdiv%3Ex%3Cdiv%3E%3C/div%3E%0A%3C/span%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22%0Ax%22"],"5c8ec9b2d6f03c2e971dc192897f3fcff92e5a32":[async_test('html5lib_tests8.html 5c8ec9b2d6f03c2e971dc192897f3fcff92e5a32'), "%3Cdiv%3Ex%3Cdiv%3E%3C/div%3Ex%3C/span%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22xx%22"],"a1fe2c2debb936fc1bf663f0d7228eb509522467":[async_test('html5lib_tests8.html a1fe2c2debb936fc1bf663f0d7228eb509522467'), "%3Cdiv%3Ex%3Cdiv%3E%3C/div%3Ey%3C/span%3Ez", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22yz%22"],"dbd09e012016b52703ab081360265d3bf96f3c76":[async_test('html5lib_tests8.html dbd09e012016b52703ab081360265d3bf96f3c76'), "%3Ctable%3E%3Cdiv%3Ex%3Cdiv%3E%3C/div%3Ex%3C/span%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22xx%22%0A%7C%20%20%20%20%20%3Ctable%3E"],"bf7c4a4a4872a47746e3e26a2e57394352514c2a":[async_test('html5lib_tests8.html bf7c4a4a4872a47746e3e26a2e57394352514c2a'), "%3Ctable%3E%3Cli%3E%3Cli%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cli%3E%0A%7C%20%20%20%20%20%3Cli%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"a57d838264ec0d79c8b0c3cb1feb5cb941c0084d":[async_test('html5lib_tests8.html a57d838264ec0d79c8b0c3cb1feb5cb941c0084d'), "x%3Ctable%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22xx%22%0A%7C%20%20%20%20%20%3Ctable%3E"],"263ff1438ee785d081669eea0fa110cca1d0d590":[async_test('html5lib_tests8.html 263ff1438ee785d081669eea0fa110cca1d0d590'), "x%3Ctable%3E%3Ctable%3Ex", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%22x%22%0A%7C%20%20%20%20%20%3Ctable%3E"],"1ace730a87644923b11aa89e4e472cc5dd91edb7":[async_test('html5lib_tests8.html 1ace730a87644923b11aa89e4e472cc5dd91edb7'), "%3Cb%3Ea%3Cdiv%3E%3C/div%3E%3Cdiv%3E%3C/b%3Ey", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22a%22%0A%7C%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%22y%22"],"26454c08b0d791754bf2f94fbee62624cae5fa5c":[async_test('html5lib_tests8.html 26454c08b0d791754bf2f94fbee62624cae5fa5c'), "%3Ca%3E%3Cdiv%3E%3Cp%3E%3C/a%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ca%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Ca%3E%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ca%3E"],
|
||||
}
|
||||
init_tests(get_type());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Foreign contexts with HTML tag children</title>
|
||||
<link rel="author" href="mailto:masonf@chromium.org">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
const contexts = ["svg", "math"];
|
||||
const elements = ["/p", "/br", "b", "big", "blockquote", "br", "center", "code", "dd", "div", "dl", "dt", "em", "embed", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "li", "listing", "menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub", "sup", "table", "tt", "u", "ul", "var"];
|
||||
contexts.forEach(c => {
|
||||
elements.forEach(e => {
|
||||
const wrapper = document.createElement('div');
|
||||
const html = `<${c}><${e}></${c}`
|
||||
wrapper.innerHTML = html;
|
||||
assert_not_equals(wrapper.innerHTML, html, "The inner HTML should get mutated");
|
||||
|
||||
const tagname = e[0]=='/' ? e.substr(1) : e;
|
||||
const element = wrapper.getElementsByTagName(tagname)[0];
|
||||
assert_not_equals(element, undefined,`Unable to locate the ${e} node in ${c}`)
|
||||
const parent = element.parentNode
|
||||
assert_equals(element.parentNode, wrapper,`The ${e} tag did not exit the ${c}`)
|
||||
});
|
||||
});
|
||||
}, "HTML namespace nodes should exit foreign contexts");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test that when the scripting flag is disabled, a head start tag in "in head noscript" mode is ignored</title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<body>
|
||||
<script>
|
||||
promise_test(async function(t) {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.srcdoc = "<!DOCTYPE html><head><noscript><head><style></style>";
|
||||
iframe.sandbox = "allow-same-origin";
|
||||
let loaded = new Promise(resolve => iframe.onload = resolve);
|
||||
document.body.append(iframe);
|
||||
await loaded;
|
||||
assert_equals(String(iframe.contentDocument.querySelector("noscript").firstChild), "[object HTMLStyleElement]");
|
||||
}, "When the scripting flag is disabled, a head start tag in \"in head noscript\" mode should be ignored");
|
||||
</script>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>math in html: parsing</title>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>math in html: parsing</h1>
|
||||
|
||||
<div id="log" style="display:block"></div>
|
||||
|
||||
<div style="display:none">
|
||||
<div><math id="m1"><mtext/></math></div>
|
||||
<div id="d1"><math><mrow/><mi/></math></div>
|
||||
<div id="d2"><math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math></div>
|
||||
<div id="d3">⟨⟩</div>
|
||||
<div id="d4">𝕂</div>
|
||||
<div id="d5"><math><semantics><mi>a</mi><annotation-xml><foo/><bar/></annotation-xml></semantics></math></div>
|
||||
<div id="d6"><math><semantics><mi>a</mi><annotation-xml encoding="text/html"><div></div></annotation-xml></semantics><mn/></math>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m1"),document.getElementsByTagName("math")[0]);
|
||||
},"The id attribute should be recognised on math elements");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d1").firstChild.nodeName,"math")
|
||||
},"The node name should be math");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d1").firstChild.namespaceURI ,"http://www.w3.org/1998/Math/MathML")
|
||||
},"math should be in MathML Namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d1").firstChild.childNodes.length ,2)
|
||||
},"Math has 2 children (empty tag syntax)");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d2").firstChild.childNodes.length ,1)
|
||||
},"Nested mrow elements should be parsed correctly");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d3").firstChild.nodeValue ,"\u27E8\u27E9")
|
||||
},"Testing rang and lang entity code points");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d4").firstChild.nodeValue ,"\uD835\uDD42")
|
||||
},"Testing Kopf (Plane 1) entity code point");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d5").firstChild.firstChild.childNodes[1].childNodes.length ,2)
|
||||
},"Empty element tags in annotation-xml parsed as per XML.");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d6").firstChild.childNodes.length ,2)
|
||||
},"html tags allowed in annotation-xml/@encoding='text/html'.");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,132 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>math in html: parsing</title>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>math in html: parsing</h1>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<div>
|
||||
<div><MATH id="m1"><Mtext/></math></div>
|
||||
<div id="d1"><math><MI MATHVARIANT="BOLD" /></math></div>
|
||||
<div id="d2"><math><semantics DEFINITIONurl="www.example.org/FOO"><mi>a</mi><annotation-xml><foo/><bar/></annotation-xml></semantics></math></div>
|
||||
<div><math id="m3span-mtext"><mtext><Span>x</Span></mtext></math></div>
|
||||
<div><math id="m3span-mi"><mi><Span>x</Span></mi></math></div>
|
||||
<div><math id="m3span-mrow"><mi><Span>x</Span></mrow></math></div>
|
||||
<div><math id="m3p-mtext"><mtext><P>x</P></mtext></math></div>
|
||||
<div><math id="m3p-mi"><mi><P>x</P></mi></math></div>
|
||||
<div id="d3p-mrow"><math><mrow><P>x</P><mi>y</mi></mrow></math></div>
|
||||
<div><math id="m4"><mtext><Undefinedelement>x</Undefinedelement></mtext></math></div>
|
||||
<div><math id="m5"><mtext><mi>x</mi></mtext></math></div>
|
||||
<div><math><semantics><mi>x</mi>
|
||||
<annotation-xml><p id="p6default">x</p></annotation-xml>
|
||||
</semantics></math></div>
|
||||
<div><math><semantics><mi>x</mi>
|
||||
<annotation-xml encoding=text/html><p id="p6texthtml">x</p></annotation-xml>
|
||||
</semantics></math></div>
|
||||
<div><math><semantics><mi>x</mi>
|
||||
<annotation-xml encoding=TEXT/HTML><p id="p6uctexthtml">x</p></annotation-xml>
|
||||
</semantics></math></div>
|
||||
<div><math><semantics><mi>x</mi>
|
||||
<annotation-xml encoding=application/xhtml+xml><p id="p6applicationxhtmlxml">x</p></annotation-xml>
|
||||
</semantics></math></div>
|
||||
<div><math><semantics><mi>x</mi>
|
||||
<annotation-xml encoding=foo><p id="p6foo">x</p></annotation-xml>
|
||||
</semantics></math></div>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m1"),document.getElementsByTagName("math")[0]);
|
||||
},"MATH element name should be lowercased");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d1").firstChild.firstChild.nodeName,"mi");
|
||||
assert_equals(document.getElementById("d1").firstChild.firstChild.namespaceURI, "http://www.w3.org/1998/Math/MathML");
|
||||
assert_true(document.getElementById("d1").firstChild.firstChild.hasAttribute("mathvariant"));
|
||||
assert_equals(document.getElementById("d1").firstChild.firstChild.getAttribute("mathvariant"),"BOLD")
|
||||
},"MI element name and mathvariant attribute name should be lowercased, attribute value unchanged");
|
||||
|
||||
test(function() {
|
||||
assert_true(document.getElementById("d2").firstChild.firstChild.hasAttribute("definitionURL"));
|
||||
assert_equals(document.getElementById("d2").firstChild.firstChild.getAttribute("definitionURL"),"www.example.org/FOO")
|
||||
},"DEFINITIONurl attribute markup should produce a definitionURL attribute, attribute value unchanged");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m3span-mtext").firstChild.firstChild.nodeName,"SPAN");
|
||||
assert_equals(document.getElementById("m3span-mtext").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"html Span in mtext produces SPAN nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m3span-mi").firstChild.firstChild.nodeName,"SPAN");
|
||||
assert_equals(document.getElementById("m3span-mi").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"html Span in mi produces SPAN nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m3span-mrow").firstChild.firstChild.nodeName,"SPAN");
|
||||
assert_equals(document.getElementById("m3span-mrow").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"html Span in mrow produces SPAN nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m3p-mtext").firstChild.firstChild.nodeName,"P");
|
||||
assert_equals(document.getElementById("m3p-mtext").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"html P in mtext produces P nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m3p-mi").firstChild.firstChild.nodeName,"P");
|
||||
assert_equals(document.getElementById("m3p-mi").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"html P in mi produces P nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d3p-mrow").childNodes.length ,3)
|
||||
},"html P in mrow terminates the math: mrow,P,MI children of div");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d3p-mrow").firstChild.childNodes.length ,1)
|
||||
},"html P in mrow terminates the math: mrow child of math");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d3p-mrow").firstChild.firstChild.childNodes.length ,0)
|
||||
},"html P in mrow terminates the math: mrow empty");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("d3p-mrow").childNodes[0].nodeName,"math");
|
||||
assert_equals(document.getElementById("d3p-mrow").childNodes[1].nodeName,"P");
|
||||
assert_equals(document.getElementById("d3p-mrow").childNodes[2].nodeName,"MI");
|
||||
},"html P in mrow terminates the math: math,P,MI children of div");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m4").firstChild.firstChild.nodeName,"UNDEFINEDELEMENT");
|
||||
assert_equals(document.getElementById("m4").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"Undefinedelement in mtext produces UNDEFINEDELEMENT nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("m5").firstChild.firstChild.nodeName,"MI");
|
||||
assert_equals(document.getElementById("m5").firstChild.firstChild.namespaceURI,"http://www.w3.org/1999/xhtml")
|
||||
},"mi in mtext produces MI nodename in XHTML namespace");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("p6default").parentNode.nodeName,"DIV")
|
||||
},"p in annotation-xml moves to be child of DIV");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("p6texthtml").parentNode.nodeName,"annotation-xml")
|
||||
},"p in annotation-xml encoding=text/html stays as child of annotation-xml");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("p6uctexthtml").parentNode.nodeName,"annotation-xml")
|
||||
},"p in annotation-xml encoding=TEXT/HTML stays as child of annotation-xml");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("p6applicationxhtmlxml").parentNode.nodeName,"annotation-xml")
|
||||
},"p in annotation-xml encoding=application/xhtml+xml stays as child of annotation-xml");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("p6foo").parentNode.nodeName,"DIV")
|
||||
},"p in annotation-xml encoding=foo moves to be child of DIV");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Encoding specified in the "charset" attribute should have precedence over "content" attribute.</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r" charset="iso-8859-15">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead">
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<script>
|
||||
test(function () {
|
||||
assert_equals(document.characterSet, "ISO-8859-15");
|
||||
}, "Encoding specified in the 'charset' attribute should have precedence over 'content' attribute.");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Tests for known named character references</title>
|
||||
<meta name=viewport content="width=device-width">
|
||||
<!-- Alternative output: http://mathias.html5.org/tests/html/named-character-references/ -->
|
||||
<div id=log></div>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<script src=named-character-references-data.js></script>
|
||||
<script>
|
||||
(function() {
|
||||
|
||||
function pad(string, totalCharacters) {
|
||||
return totalCharacters < string.length ? string : (Array(totalCharacters + 1).join('0') + string).slice(-totalCharacters);
|
||||
}
|
||||
|
||||
var dummy = document.createElement('p');
|
||||
|
||||
Object.keys(data).forEach(function(entity) {
|
||||
var object = data[entity];
|
||||
dummy.innerHTML = entity;
|
||||
test(
|
||||
function() {
|
||||
assert_equals(
|
||||
dummy.textContent,
|
||||
object.characters
|
||||
);
|
||||
},
|
||||
entity + ' should match ' + object.codepoints.map(function(codePoint) {
|
||||
return 'U+' + pad(codePoint.toString(16).toUpperCase(), 5);
|
||||
}).join(' ')
|
||||
);
|
||||
});
|
||||
|
||||
}());
|
||||
</script>
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype>
|
||||
<meta charset=utf-8>
|
||||
<title>Doctype without root name should have empty-string name in the DOM even if null in the tokenizer spec.</title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
window.onload = function() {
|
||||
test(function () {
|
||||
assert_equals(document.doctype.name, "", "Top-level");
|
||||
let iframes = document.getElementsByTagName("iframe");
|
||||
for (let i = 0; i < iframes.length; ++i) {
|
||||
let iframe = iframes[i];
|
||||
assert_equals(iframe.contentDocument.doctype.name, "", iframe.title);
|
||||
}
|
||||
}, "Doctype without root name should have the empty string as the name.");
|
||||
done();
|
||||
}
|
||||
</script>
|
||||
<iframe src="support/no-doctype-name-space.html" title='space'></iframe>
|
||||
<iframe src="support/no-doctype-name-line.html" title='line'></iframe>
|
||||
<iframe src="support/no-doctype-name-eof.html" title='eof'></iframe>
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<meta http-equiv="Content-Type" content='charset="windows-1251'>
|
||||
<meta charset=windows-1250>
|
||||
<title></title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<link rel=help href="https://html.spec.whatwg.org/#algorithm-for-extracting-a-character-encoding-from-a-meta-element">
|
||||
<script>
|
||||
test(function() {
|
||||
assert_equals(document.characterSet, "windows-1250");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,14 @@
|
|||
t.step(function() {
|
||||
assert_false(dcl, "DOMContentLoaded should not have fired before executing " +
|
||||
"a defer script");
|
||||
|
||||
t.step_timeout(function() {
|
||||
assert_false(dcl, "DOMContentLoaded should not have fired before " +
|
||||
"executing a task queued from a defer script");
|
||||
t.step_timeout(function() {
|
||||
assert_true(dcl, "DOMContentLoaded should have fired in a task that " +
|
||||
"was queued after the DOMContentLoaded task was queued");
|
||||
t.done();
|
||||
}, 0);
|
||||
}, 0);
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
<!DOCTYPE
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE
|
||||
>
|
|
@ -0,0 +1 @@
|
|||
<!DOCTYPE >
|
|
@ -0,0 +1 @@
|
|||
scriptSelfClosing = true;
|
|
@ -0,0 +1,214 @@
|
|||
/*
|
||||
* Template code
|
||||
*
|
||||
* A template is just a javascript structure. An element is represented as:
|
||||
*
|
||||
* [tag_name, {attr_name:attr_value}, child1, child2]
|
||||
*
|
||||
* the children can either be strings (which act like text nodes), other templates or
|
||||
* functions (see below)
|
||||
*
|
||||
* A text node is represented as
|
||||
*
|
||||
* ["{text}", value]
|
||||
*
|
||||
* String values have a simple substitution syntax; ${foo} represents a variable foo.
|
||||
*
|
||||
* It is possible to embed logic in templates by using a function in a place where a
|
||||
* node would usually go. The function must either return part of a template or null.
|
||||
*
|
||||
* In cases where a set of nodes are required as output rather than a single node
|
||||
* with children it is possible to just use a list
|
||||
* [node1, node2, node3]
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* render(template, substitutions) - take a template and an object mapping
|
||||
* variable names to parameters and return either a DOM node or a list of DOM nodes
|
||||
*
|
||||
* substitute(template, substitutions) - take a template and variable mapping object,
|
||||
* make the variable substitutions and return the substituted template
|
||||
*
|
||||
*/
|
||||
|
||||
function is_single_node(template)
|
||||
{
|
||||
return typeof template[0] === "string";
|
||||
}
|
||||
|
||||
function substitute(template, substitutions)
|
||||
{
|
||||
if (typeof template === "function") {
|
||||
var replacement = template(substitutions);
|
||||
if (replacement)
|
||||
{
|
||||
var rv = substitute(replacement, substitutions);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (is_single_node(template))
|
||||
{
|
||||
return substitute_single(template, substitutions);
|
||||
}
|
||||
else
|
||||
{
|
||||
return filter(map(template, function(x) {
|
||||
return substitute(x, substitutions);
|
||||
}), function(x) {return x !== null;});
|
||||
}
|
||||
}
|
||||
expose(substitute, "template.substitute");
|
||||
|
||||
function substitute_single(template, substitutions)
|
||||
{
|
||||
var substitution_re = /\${([^ }]*)}/g;
|
||||
|
||||
function do_substitution(input) {
|
||||
var components = input.split(substitution_re);
|
||||
var rv = [];
|
||||
for (var i=0; i<components.length; i+=2)
|
||||
{
|
||||
rv.push(components[i]);
|
||||
if (components[i+1])
|
||||
{
|
||||
rv.push(substitutions[components[i+1]]);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
var rv = [];
|
||||
rv.push(do_substitution(String(template[0])).join(""));
|
||||
|
||||
if (template[0] === "{text}") {
|
||||
substitute_children(template.slice(1), rv);
|
||||
} else {
|
||||
substitute_attrs(template[1], rv);
|
||||
substitute_children(template.slice(2), rv);
|
||||
}
|
||||
|
||||
function substitute_attrs(attrs, rv)
|
||||
{
|
||||
rv[1] = {};
|
||||
for (name in template[1])
|
||||
{
|
||||
if (attrs.hasOwnProperty(name))
|
||||
{
|
||||
var new_name = do_substitution(name).join("");
|
||||
var new_value = do_substitution(attrs[name]).join("");
|
||||
rv[1][new_name] = new_value;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function substitute_children(children, rv)
|
||||
{
|
||||
for (var i=0; i<children.length; i++)
|
||||
{
|
||||
if (children[i] instanceof Object) {
|
||||
var replacement = substitute(children[i], substitutions);
|
||||
if (replacement !== null)
|
||||
{
|
||||
if (is_single_node(replacement))
|
||||
{
|
||||
rv.push(replacement);
|
||||
}
|
||||
else
|
||||
{
|
||||
extend(rv, replacement);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
extend(rv, do_substitution(String(children[i])));
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
function make_dom_single(template)
|
||||
{
|
||||
if (template[0] === "{text}")
|
||||
{
|
||||
var element = document.createTextNode("");
|
||||
for (var i=1; i<template.length; i++)
|
||||
{
|
||||
element.data += template[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var element = document.createElement(template[0]);
|
||||
for (name in template[1]) {
|
||||
if (template[1].hasOwnProperty(name))
|
||||
{
|
||||
element.setAttribute(name, template[1][name]);
|
||||
}
|
||||
}
|
||||
for (var i=2; i<template.length; i++)
|
||||
{
|
||||
if (template[i] instanceof Object)
|
||||
{
|
||||
var sub_element = make_dom(template[i]);
|
||||
element.appendChild(sub_element);
|
||||
}
|
||||
else
|
||||
{
|
||||
var text_node = document.createTextNode(template[i]);
|
||||
element.appendChild(text_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function make_dom(template, substitutions)
|
||||
{
|
||||
if (is_single_node(template))
|
||||
{
|
||||
return make_dom_single(template);
|
||||
}
|
||||
else
|
||||
{
|
||||
return map(template, function(x) {
|
||||
return make_dom_single(x);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function render(template, substitutions)
|
||||
{
|
||||
return make_dom(substitute(template, substitutions));
|
||||
}
|
||||
expose(render, "template.render");
|
||||
|
||||
function expose(object, name)
|
||||
{
|
||||
var components = name.split(".");
|
||||
var target = window;
|
||||
for (var i=0; i<components.length - 1; i++)
|
||||
{
|
||||
if (!(components[i] in target))
|
||||
{
|
||||
target[components[i]] = {};
|
||||
}
|
||||
target = target[components[i]];
|
||||
}
|
||||
target[components[components.length - 1]] = object;
|
||||
}
|
||||
|
||||
function extend(array, items)
|
||||
{
|
||||
Array.prototype.push.apply(array, items);
|
||||
}
|
350
Tests/LibWeb/Text/input/wpt-import/html/syntax/parsing/test.js
Normal file
350
Tests/LibWeb/Text/input/wpt-import/html/syntax/parsing/test.js
Normal file
|
@ -0,0 +1,350 @@
|
|||
var namespaces = {
|
||||
"html":"http://www.w3.org/1999/xhtml",
|
||||
"math":"http://www.w3.org/1998/Math/MathML",
|
||||
"mathml":"http://www.w3.org/1998/Math/MathML",
|
||||
"svg":"http://www.w3.org/2000/svg",
|
||||
"xlink":"http://www.w3.org/1999/xlink",
|
||||
"xml":"http://www.w3.org/XML/1998/namespace",
|
||||
"xmlns":"http://www.w3.org/2000/xmlns/"
|
||||
};
|
||||
|
||||
var prefixes = {};
|
||||
for (var prefix in namespaces) {
|
||||
if (namespaces.hasOwnProperty(prefix)) {
|
||||
prefixes[namespaces[prefix]] = prefix;
|
||||
}
|
||||
}
|
||||
prefixes[namespaces["mathml"]] = "math";
|
||||
|
||||
function format(format_string) {
|
||||
var insertions = Array.prototype.slice.call(arguments, 1);
|
||||
var regexp = /%s/g;
|
||||
var match_count = 0;
|
||||
var rv = format_string.replace(regexp, function(match) {
|
||||
var rv = insertions[match_count];
|
||||
match_count++;
|
||||
return rv;
|
||||
});
|
||||
return rv;
|
||||
}
|
||||
|
||||
function test_serializer(element) {
|
||||
element.normalize();
|
||||
var lines = [];
|
||||
function serialize_element(element, indent) {
|
||||
var indent_spaces = (new Array(indent)).join(" ");
|
||||
switch(element.nodeType) {
|
||||
case Node.DOCUMENT_TYPE_NODE:
|
||||
if (element.name) {
|
||||
if (element.publicId || element.systemId) {
|
||||
var publicId = element.publicId ? element.publicId : "";
|
||||
var systemId = element.systemId ? element.systemId : "";
|
||||
lines.push(format("|%s<!DOCTYPE %s \"%s\" \"%s\">", indent_spaces,
|
||||
element.name, publicId, systemId));
|
||||
} else {
|
||||
lines.push(format("|%s<!DOCTYPE %s>", indent_spaces,
|
||||
element.name));
|
||||
}
|
||||
} else {
|
||||
lines.push(format("|%s<!DOCTYPE >", indent_spaces));
|
||||
}
|
||||
break;
|
||||
case Node.DOCUMENT_NODE:
|
||||
lines.push("#document");
|
||||
break;
|
||||
case Node.DOCUMENT_FRAGMENT_NODE:
|
||||
lines.push("#document-fragment");
|
||||
break;
|
||||
case Node.COMMENT_NODE:
|
||||
lines.push(format("|%s<!-- %s -->", indent_spaces, element.nodeValue));
|
||||
break;
|
||||
case Node.TEXT_NODE:
|
||||
lines.push(format("|%s\"%s\"", indent_spaces, element.nodeValue));
|
||||
break;
|
||||
case Node.ELEMENT_NODE:
|
||||
if (element.getAttribute("data-skip") !== null) {
|
||||
return;
|
||||
}
|
||||
if (element.namespaceURI !== null && element.namespaceURI !== namespaces.html) {
|
||||
var name = format("%s %s", prefixes[element.namespaceURI],
|
||||
element.localName);
|
||||
} else {
|
||||
var name = element.localName;
|
||||
}
|
||||
lines.push(format("|%s<%s>", indent_spaces, name));
|
||||
|
||||
var attributes = Array.prototype.map.call(
|
||||
element.attributes,
|
||||
function(attr) {
|
||||
var name = (attr.namespaceURI ? prefixes[attr.namespaceURI] + " " : "") +
|
||||
attr.localName;
|
||||
return [name, attr.value];
|
||||
});
|
||||
attributes.sort(function (a, b) {
|
||||
var x = a[0];
|
||||
var y = b[0];
|
||||
if (x === y) {
|
||||
return 0;
|
||||
}
|
||||
return x > y ? 1 : -1;
|
||||
});
|
||||
|
||||
attributes.forEach(
|
||||
function(attr) {
|
||||
var indent_spaces = (new Array(indent + 2)).join(" ");
|
||||
lines.push(format("|%s%s=\"%s\"", indent_spaces, attr[0], attr[1]));
|
||||
}
|
||||
);
|
||||
if ("HTMLTemplateElement" in window &&
|
||||
Object.prototype.toString.call(element) === "[object HTMLTemplateElement]") {
|
||||
indent += 2;
|
||||
indent_spaces = (new Array(indent)).join(" ");
|
||||
lines.push(format("|%scontent", indent_spaces));
|
||||
indent += 2;
|
||||
Array.prototype.forEach.call(element.content.childNodes,
|
||||
function(node) {
|
||||
serialize_element(node, indent);
|
||||
});
|
||||
indent -= 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
indent += 2;
|
||||
Array.prototype.forEach.call(element.childNodes,
|
||||
function(node) {
|
||||
serialize_element(node, indent);
|
||||
});
|
||||
}
|
||||
serialize_element(element, 0);
|
||||
return lines.join("\n");
|
||||
}
|
||||
|
||||
function parse_query() {
|
||||
var query = location.search.slice(1);
|
||||
var vars = query.split("&");
|
||||
var fields = vars.map(function (x) {
|
||||
var split = x.split("=");
|
||||
return [split[0], split.slice(1).join("=")];
|
||||
});
|
||||
return fields;
|
||||
}
|
||||
|
||||
function get_type() {
|
||||
var run_type = "uri";
|
||||
var fields = parse_query();
|
||||
fields.forEach(function(x) {
|
||||
if(x[0] == "run_type") {
|
||||
run_type = x[1];
|
||||
}
|
||||
});
|
||||
return run_type;
|
||||
};
|
||||
|
||||
var test_in_blob_uri = get_test_func(function (iframe, uri_encoded_input, t) {
|
||||
var b = new Blob([decodeURIComponent(uri_encoded_input)], { type: "text/html" });
|
||||
var blobURL = URL.createObjectURL(b);
|
||||
iframe.src = blobURL;
|
||||
t.add_cleanup(function() {
|
||||
URL.revokeObjectURL(blobURL);
|
||||
});
|
||||
});
|
||||
|
||||
var test_document_write = get_test_func(function(iframe, uri_encoded_input, t) {
|
||||
iframe.contentDocument.open();
|
||||
var input = decodeURIComponent(uri_encoded_input);
|
||||
iframe.contentDocument.write(input);
|
||||
iframe.contentDocument.close();
|
||||
});
|
||||
|
||||
var test_document_write_single = get_test_func(function(iframe, uri_encoded_input, t) {
|
||||
iframe.contentDocument.open();
|
||||
var input = decodeURIComponent(uri_encoded_input);
|
||||
for (var i=0; i< input.length; i++) {
|
||||
iframe.contentDocument.write(input[i]);
|
||||
}
|
||||
iframe.contentDocument.close();
|
||||
});
|
||||
|
||||
function get_test_func(inject_func) {
|
||||
function test_func(iframe, t, test_id, uri_encoded_input, escaped_expected) {
|
||||
var expected = decodeURIComponent(escaped_expected);
|
||||
current_tests[iframe.id] = {test_id:test_id,
|
||||
uri_encoded_input:uri_encoded_input,
|
||||
expected:expected,
|
||||
actual:null
|
||||
};
|
||||
|
||||
iframe.onload = function() {
|
||||
t.step(function() {
|
||||
iframe.onload = null;
|
||||
var serialized_dom = test_serializer(iframe.contentDocument);
|
||||
current_tests[iframe.id].actual = serialized_dom;
|
||||
assert_equals(serialized_dom, expected);
|
||||
t.done();
|
||||
}
|
||||
);
|
||||
};
|
||||
inject_func(iframe, uri_encoded_input, t);
|
||||
}
|
||||
return test_func;
|
||||
}
|
||||
|
||||
function test_fragment(iframe, t, test_id, uri_encoded_input, escaped_expected, container) {
|
||||
var input_string = decodeURIComponent(uri_encoded_input);
|
||||
var expected = decodeURIComponent(escaped_expected);
|
||||
current_tests[iframe.id] = {
|
||||
test_id:test_id,
|
||||
input:uri_encoded_input,
|
||||
expected:expected,
|
||||
actual:null,
|
||||
container:container
|
||||
};
|
||||
|
||||
var components = container.split(" ");
|
||||
var container_elem = null;
|
||||
if (components.length > 1) {
|
||||
var namespace = namespaces[components[0]];
|
||||
container_elem = document.createElementNS(namespace,
|
||||
components[0] + ":" +
|
||||
components[1]);
|
||||
} else {
|
||||
container_elem = document.createElement(container);
|
||||
}
|
||||
container_elem.innerHTML = input_string;
|
||||
var serialized_dom;
|
||||
if (container_elem.namespaceURI === namespaces["html"] && container_elem.localName === "template") {
|
||||
serialized_dom = test_serializer(container_elem.content);
|
||||
} else {
|
||||
serialized_dom = test_serializer(container_elem);
|
||||
}
|
||||
current_tests[iframe.id].actual = serialized_dom;
|
||||
serialized_dom = convert_innerHTML(serialized_dom);
|
||||
assert_equals(serialized_dom, expected);
|
||||
t.done();
|
||||
}
|
||||
|
||||
function convert_innerHTML(serialized_dom) {
|
||||
var lines = serialized_dom.split("\n");
|
||||
assert_not_equals(lines[0], "<template>", "template is never the innerHTML context object");
|
||||
lines[0] = "#document";
|
||||
return lines.join("\n");
|
||||
}
|
||||
|
||||
function print_diffs(test_id, uri_encoded_input, expected, actual, container) {
|
||||
container = container ? container : null;
|
||||
if (actual) {
|
||||
var diffs = mark_diffs(expected, actual);
|
||||
var expected_text = diffs[0];
|
||||
var actual_text = diffs[1];
|
||||
} else {
|
||||
var expected_text = expected;
|
||||
var actual_text = "";
|
||||
}
|
||||
|
||||
var tmpl = ["div", {"id":"${test_id}"},
|
||||
["h2", {}, "${test_id}"],
|
||||
function(vars) {
|
||||
if (vars.container !== null) {
|
||||
return ["div", {"class":"container"},
|
||||
["h3", {}, "innerHTML Container"],
|
||||
["pre", {}, vars.container]];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
["div", {"id":"input_${test_id}"}, ["h3", {}, "Input"], ["pre", {},
|
||||
["code", {}, decodeURIComponent(uri_encoded_input)]]],
|
||||
["div", {"id":"expected_${test_id}"}, ["h3", {}, "Expected"],
|
||||
["pre", {}, ["code", {}, expected_text]]],
|
||||
["div", {"id":"actual_${test_id}"}, ["h3", {}, "Actual"],
|
||||
["pre", {}, ["code", {}, actual_text]]]
|
||||
];
|
||||
|
||||
var diff_dom = template.render(tmpl, {test_id:test_id, container:container});
|
||||
document.body.appendChild(diff_dom);
|
||||
}
|
||||
|
||||
var current_tests = {};
|
||||
var iframe_map = {};
|
||||
|
||||
function init_tests(test_type) {
|
||||
var test_func = null;
|
||||
var test_funcs = {
|
||||
"write":test_document_write,
|
||||
"write_single":test_document_write_single,
|
||||
"uri":test_in_blob_uri,
|
||||
"innerHTML":test_fragment
|
||||
};
|
||||
var tests_started = 0;
|
||||
var tests_complete = 0;
|
||||
|
||||
setup(function() {
|
||||
test_func = test_funcs[test_type];
|
||||
|
||||
var fails = [];
|
||||
|
||||
add_result_callback(function(test) {
|
||||
tests_complete++;
|
||||
var iframe = document.getElementById(iframe_map[test.name]);
|
||||
if (test.status !== test.PASS) {
|
||||
fails.push(current_tests[iframe.id]);
|
||||
var new_iframe = document.createElement("iframe");
|
||||
new_iframe.style.display = "none";
|
||||
new_iframe.id = iframe.id;
|
||||
document.body.replaceChild(new_iframe, iframe);
|
||||
iframe = new_iframe;
|
||||
}
|
||||
if (tests_complete === order.length) {
|
||||
done();
|
||||
} else if (tests_started < order.length) {
|
||||
test_next(iframe);
|
||||
}
|
||||
});
|
||||
|
||||
add_completion_callback(function() {
|
||||
fails.forEach(function(t) {
|
||||
print_diffs(t.test_id, t.uri_encoded_input,
|
||||
t.expected, t.actual);
|
||||
});
|
||||
});
|
||||
|
||||
//Create the iframes we will use to test
|
||||
//in the innerHTML case these are not actually used
|
||||
//but it is convenient to reuse the same code
|
||||
for (var i=0; i<num_iframes; i++) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.id = "iframe_" + i;
|
||||
iframe.style.display = "none";
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
},
|
||||
{explicit_done:true});
|
||||
|
||||
function test_next(iframe) {
|
||||
var test_id = order[tests_started];
|
||||
tests_started++;
|
||||
var x = tests[test_id];
|
||||
var t = x[0];
|
||||
iframe_map[t.name] = iframe.id;
|
||||
step_timeout(function() {
|
||||
t.step(function() {
|
||||
var string_uri_encoded_input = x[1];
|
||||
var string_escaped_expected = x[2];
|
||||
if (test_type === "innerHTML") {
|
||||
var container = x[3];
|
||||
}
|
||||
test_func(iframe, t, test_id, string_uri_encoded_input, string_escaped_expected,
|
||||
container);
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
|
||||
onload = function() {
|
||||
Array.prototype.forEach.call(document.getElementsByTagName("iframe"),
|
||||
function(iframe) {
|
||||
if (tests_started<order.length) {
|
||||
test_next(iframe);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>The end</title>
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/#the-end">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
document.addEventListener("DOMContentLoaded", this.step_func_done(function(e) {
|
||||
assert_equals(e.type, "DOMContentLoaded");
|
||||
assert_true(e.bubbles, "bubbles should be true");
|
||||
assert_false(e.cancelable, "cancelable should be false");
|
||||
assert_equals(e.target, document, "target should be document");
|
||||
assert_true(e.isTrusted, "isTrusted should be true");
|
||||
assert_class_string(e, "Event");
|
||||
}));
|
||||
}, "DOMContentLoaded");
|
||||
|
||||
async_test(function() {
|
||||
window.addEventListener("load", this.step_func_done(function(e) {
|
||||
assert_equals(e.type, "load");
|
||||
assert_false(e.bubbles, "bubbles should be false");
|
||||
assert_false(e.cancelable, "cancelable should be false");
|
||||
assert_equals(e.target, document, "target should be document");
|
||||
assert_true(e.isTrusted, "isTrusted should be true");
|
||||
assert_class_string(e, "Event");
|
||||
}));
|
||||
}, "load");
|
||||
|
||||
async_test(function() {
|
||||
window.addEventListener("pageshow", this.step_func_done(function(e) {
|
||||
assert_equals(e.type, "pageshow");
|
||||
|
||||
// https://github.com/whatwg/html/issues/6794
|
||||
assert_true(e.bubbles, "bubbles should be true");
|
||||
assert_true(e.cancelable, "cancelable should be true");
|
||||
|
||||
assert_equals(e.target, document, "target should be document");
|
||||
assert_true(e.isTrusted, "isTrusted should be true");
|
||||
assert_class_string(e, "PageTransitionEvent");
|
||||
}));
|
||||
}, "pageshow");
|
||||
|
||||
async_test(function() {
|
||||
var seen_dcl = false;
|
||||
var seen_load = false;
|
||||
document.addEventListener("DOMContentLoaded", this.step_func(function() {
|
||||
seen_dcl = true;
|
||||
}));
|
||||
window.addEventListener("load", this.step_func(function() {
|
||||
seen_load = true;
|
||||
assert_true(seen_dcl, "DOMContentLoaded should be fired before load");
|
||||
}));
|
||||
window.addEventListener("pageshow", this.step_func_done(function() {
|
||||
assert_true(seen_load, "load should be fired before pageshow")
|
||||
}));
|
||||
}, "order");
|
||||
</script>
|
|
@ -0,0 +1,45 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var scriptWithEndTagRan = false;
|
||||
var scriptWithoutEndTagRan = false;
|
||||
var scriptWithBogusEndTagInsideRan = false;
|
||||
var scriptWithBreakout = false;
|
||||
var scriptSelfClosing = false;
|
||||
</script>
|
||||
<svg>
|
||||
<script>scriptWithEndTagRan = true;</script>
|
||||
</svg>
|
||||
<svg>
|
||||
<script>scriptWithoutEndTagRan = true;
|
||||
</svg>
|
||||
<svg>
|
||||
<script>scriptWithBogusEndTagInsideRan = true;</g></script>
|
||||
</svg>
|
||||
<svg>
|
||||
<script>scriptWithBreakout = true;<s></script>
|
||||
</svg>
|
||||
<svg>
|
||||
<script href="support/svg-script-self-closing.js"/>
|
||||
</svg>
|
||||
</s>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_true(scriptWithEndTagRan);
|
||||
}, "SVG scripts with end tag should run");
|
||||
test(function() {
|
||||
assert_false(scriptWithoutEndTagRan);
|
||||
}, "SVG scripts without end tag should not run");
|
||||
test(function() {
|
||||
assert_true(scriptWithBogusEndTagInsideRan);
|
||||
}, "SVG scripts with bogus end tag inside should run");
|
||||
test(function() {
|
||||
assert_false(scriptWithBreakout);
|
||||
}, "SVG scripts ended by HTML breakout should not run");
|
||||
test(function() {
|
||||
assert_true(scriptSelfClosing);
|
||||
}, "SVG scripts with self-closing start tag should run");
|
||||
</script>
|
101
Tests/LibWeb/Text/input/wpt-import/html/syntax/parsing/zero.html
Normal file
101
Tests/LibWeb/Text/input/wpt-import/html/syntax/parsing/zero.html
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src=../../../resources/testharness.js></script>
|
||||
<script src=../../../resources/testharnessreport.js></script>
|
||||
<body>
|
||||
<div></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<!-\u0000>";
|
||||
assert_equals(div.firstChild.data, "-\uFFFD");
|
||||
}, "U+0000 should get replaced with U+FFFD after markup declaration hyphen");
|
||||
|
||||
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "&\u0000auml;";
|
||||
assert_equals(div.firstChild.data, "ä");
|
||||
}, "U+0000 should vanish after ampersand");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "&a\u0000uml;";
|
||||
assert_equals(div.firstChild.data, "ä");
|
||||
}, "U+0000 should vanish after ampersand and one letter of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "&au\u0000ml;";
|
||||
assert_equals(div.firstChild.data, "ä");
|
||||
}, "U+0000 should vanish after ampersand and two letters of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "&aum\u0000l;";
|
||||
assert_equals(div.firstChild.data, "ä");
|
||||
}, "U+0000 should vanish after ampersand and three letters of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "ä\u0000;";
|
||||
assert_equals(div.firstChild.data, "\u00E4;");
|
||||
}, "U+0000 should vanish after semicolonless entity");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "¬in\u0000;";
|
||||
assert_equals(div.firstChild.data, "\u00ACin;");
|
||||
}, "U+0000 should vanish before required semicolon");
|
||||
|
||||
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "a\u0000b";
|
||||
assert_equals(div.firstChild.data, "ab");
|
||||
}, "U+0000 should be dropped in body");
|
||||
|
||||
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='&\u0000auml;'>";
|
||||
assert_equals(div.firstChild.title, "&\uFFFDauml;");
|
||||
}, "U+0000 should get replaced with U+FFFD after ampersand");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='&a\u0000uml;'>";
|
||||
assert_equals(div.firstChild.title, "&a\uFFFDuml;");
|
||||
}, "U+0000 should get replaced with U+FFFD after ampersand and one letter of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='&au\u0000ml;'>";
|
||||
assert_equals(div.firstChild.title, "&au\uFFFDml;");
|
||||
}, "U+0000 should get replaced with U+FFFD after ampersand and two letters of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='&aum\u0000l;'>";
|
||||
assert_equals(div.firstChild.title, "&aum\uFFFDl;");
|
||||
}, "U+0000 should get replaced with U+FFFD after ampersand and three letters of entity prefix");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='ä\u0000;'>";
|
||||
assert_equals(div.firstChild.title, "\u00E4\uFFFD;");
|
||||
}, "U+0000 should get replaced with U+FFFD after semicolonless entity");
|
||||
|
||||
test(function() {
|
||||
var div = document.getElementsByTagName("div")[0];
|
||||
div.innerHTML = "<span title='¬in\u0000;'>";
|
||||
assert_equals(div.firstChild.title, "¬in\uFFFD;");
|
||||
}, "U+0000 should get replaced with U+FFFD before required semicolon");
|
||||
|
||||
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue