Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: http3 OR http2
- Manifest: dom/base/test/mochitest.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=455629">Mozilla Bug 455629</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
var done = 0;
function doTest(name) {
var elem = $(name);
var doc = elem.getSVGDocument();
try {
doc.foopy = 42;
fail("Able to set cross origin property!");
} catch (e) {
ok(true, "unable to set non-allAccess property cross origin");
}
if (elem instanceof HTMLObjectElement) {
doc = elem.contentDocument;
try {
doc.foopy = 42;
fail("Able to set cross origin property!");
} catch (e) {
ok(true, "unable to set non-allAccess property cross origin");
}
}
if (++done == 2) {
SimpleTest.finish();
}
}
</script>
<object id="obj"
type="image/svg+xml"
onload="doTest('obj')"
</object>
<embed id="emb"
type="image/svg+xml"
onload="doTest('emb')"
</embed>
</pre>
</body>
</html>