Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
type="text/css"?>
<!--
-->
<window title="Mozilla Bug 430050"
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 430050</a>
</body>
<!-- test code goes here -->
<script type="application/javascript"><![CDATA[
/** Test for Bug 430050 **/
function endTest() {
ok(document.getElementById('b').contentDocument.documentElement.textContent ==
"succeeded", "Wrong URL loaded!");
SimpleTest.finish();
}
function startTest() {
const observer = new MutationObserver(() => {
document.getElementById('b').setAttribute("src",
"data:text/plain,failed");
const systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
document.getElementById('b').loadURI(Services.io.newURI('data:text/plain,succeeded'), {
triggeringPrincipal: systemPrincipal
});
document.getElementById('b').addEventListener("load", endTest);
});
observer.observe(document.documentElement, { attributes: true });
document.documentElement.setAttribute("foo", "bar");
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(startTest);
]]></script>
<browser flex="1" id="b"/>
</window>