fune/testing/web-platform/tests/domparsing/innerhtml-03.xhtml
James Graham feaf3e9468 Bug 1274534 - Update web-platform-tests to revision e806420984568cd76da78de27c832b0a927d9fc6, a=testonly
MozReview-Commit-ID: 1KVr5OLKI3


--HG--
rename : testing/web-platform/tests/uievents/ClickFakeEvent.nondocument.html => testing/web-platform/tests/dom/events/Event-dispatch-detached-click.html
rename : testing/web-platform/tests/uievents/order-of-events/init-event-while-dispatching.html => testing/web-platform/tests/dom/events/Event-init-while-dispatching.html
rename : testing/web-platform/tests/uievents/constructors/constructors.html => testing/web-platform/tests/dom/events/Event-subclasses-constructors.html
rename : testing/web-platform/tests/DOM-parsing/createContextualFragment.html => testing/web-platform/tests/domparsing/createContextualFragment.html
rename : testing/web-platform/tests/DOM-parsing/innerhtml-01.xhtml => testing/web-platform/tests/domparsing/innerhtml-01.xhtml
rename : testing/web-platform/tests/DOM-parsing/innerhtml-03.xhtml => testing/web-platform/tests/domparsing/innerhtml-03.xhtml
rename : testing/web-platform/tests/DOM-parsing/innerhtml-04.html => testing/web-platform/tests/domparsing/innerhtml-04.html
rename : testing/web-platform/tests/DOM-parsing/innerhtml-05.xhtml => testing/web-platform/tests/domparsing/innerhtml-05.xhtml
rename : testing/web-platform/tests/DOM-parsing/innerhtml-07.html => testing/web-platform/tests/domparsing/innerhtml-07.html
rename : testing/web-platform/tests/DOM-parsing/insert_adjacent_html.html => testing/web-platform/tests/domparsing/insert_adjacent_html.html
rename : testing/web-platform/tests/DOM-parsing/insert_adjacent_html.js => testing/web-platform/tests/domparsing/insert_adjacent_html.js
rename : testing/web-platform/tests/DOM-parsing/insert_adjacent_html.xhtml => testing/web-platform/tests/domparsing/insert_adjacent_html.xhtml
rename : testing/web-platform/tests/DOM-parsing/outerhtml-01.html => testing/web-platform/tests/domparsing/outerhtml-01.html
rename : testing/web-platform/tests/DOM-parsing/outerhtml-02.html => testing/web-platform/tests/domparsing/outerhtml-02.html
rename : testing/web-platform/tests/DOM-parsing/xml-serialization.xhtml => testing/web-platform/tests/domparsing/xml-serialization.xhtml
2016-05-24 08:41:15 +01:00

59 lines
2.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>innerHTML in XHTML</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
<link rel="help" href="http://html5.org/specs/dom-parsing.html#dom-innerhtml"/>
<link rel="help" href="http://www.whatwg.org/html5/#xml-fragment-serialization-algorithm"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<script><![CDATA[
test(function() {
var el = document.createElement("div");
el.appendChild(document.createElement("xmp"))
.appendChild(document.createElement("span"))
.appendChild(document.createTextNode("<"));
assert_equals(el.innerHTML, "<xmp xmlns=\"http://www.w3.org/1999/xhtml\"><span>&lt;<\/span><\/xmp>");
})
test(function() {
var el = document.createElement("xmp");
el.appendChild(document.createElement("span"))
.appendChild(document.createTextNode("<"));
assert_equals(el.innerHTML, "<span xmlns=\"http://www.w3.org/1999/xhtml\">&lt;<\/span>");
})
test(function() {
var el = document.createElement("xmp");
el.appendChild(document.createTextNode("<"));
assert_equals(el.innerHTML, "&lt;");
})
test(function() {
var el = document.createElement("div");
el.appendChild(document.createElement("br"));
assert_equals(el.innerHTML, "<br xmlns=\"http://www.w3.org/1999/xhtml\" />");
})
test(function() {
var el = document.createElement("div");
el.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "html:br"));
assert_equals(el.innerHTML, "<html:br xmlns:html=\"http://www.w3.org/1999/xhtml\" />");
})
test(function() {
var el = document.createElement("div");
el.appendChild(document.createTextNode("<>\"'&"));
assert_equals(el.innerHTML, "&lt;&gt;\"'&amp;");
})
test(function() {
var el = document.createElement("div");
el.appendChild(document.createTextNode("&lt;&gt;&quot;&apos;&amp;"));
assert_equals(el.innerHTML, "&amp;lt;&amp;gt;&amp;quot;&amp;apos;&amp;amp;");
})
test(function() {
var el = document.createElement("div");
el.appendChild(document.createTextNode("àו…\u00A0"));
assert_equals(el.innerHTML, "àו…\u00A0");
})
]]></script>
</body>
</html>