mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Automatic update from web-platform-testsHTML parser: Fix "HTML integration point" implementation in HTMLTreeBuilderSimulator. HTMLTreeBuilderSimulator assumed only <foreignObject> as an HTML integration point. This CL adds <annotation-xml>, <desc>, and SVG <title>. Bug: 805924 Change-Id: I6793d9163d4c6bc8bf0790415baedddaac7a1fc2 Reviewed-on: https://chromium-review.googlesource.com/964038 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#543634} wpt-commits: dd623515aa0fa9a1fc7b60e38e7dc7ee459c7e0a wpt-pr: 10048 wpt-commits: dd623515aa0fa9a1fc7b60e38e7dc7ee459c7e0a wpt-pr: 10048
31 lines
1.7 KiB
HTML
31 lines
1.7 KiB
HTML
<!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>
|