blob: cde9b26fe5f72b61f2b73c131046ad69a2d8e74d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<p id="result" xmlns:a="urn:x-test:a" style="visibility: hidden;"></p>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>//<![CDATA[
test(function () {
var result = document.getElementById("result");
result.insertAdjacentHTML("beforeEnd", "<span a:test='some value via insertAdjacentHTML()'>Testing</span>");
var spanElement = result.lastChild;
assert_equals(spanElement.namespaceURI, "http://www.w3.org/1999/xhtml", "<span> in correct namespace");
assert_true(spanElement.hasAttributeNS("urn:x-test:a", "test"), "<span> has 'test' attribute in the 'urn:x-test:a' namespace");
assert_equals(spanElement.getAttributeNS("urn:x-test:a", "test"), "some value via insertAdjacentHTML()", "'test' attribute in the 'urn:x-test:a' namespace has the correct value");
}, "insert an XHTML fragment with in-scope namespace prefixes on attributes");
//]]>
</script>
</body>
</html>