mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 18:37:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
32
dom/xbl/test/file_bug379959_cross.html
Normal file
32
dom/xbl/test/file_bug379959_cross.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
#div1 {
|
||||
color: green;
|
||||
-moz-binding: url(file_bug379959_xbl.xml#xbltest);
|
||||
}
|
||||
#div2 {
|
||||
color: green;
|
||||
-moz-binding: url(http://example.com/tests/dom/xbl/test/file_bug379959_xbl.xml#xbltest);
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="div1"></div>
|
||||
<div id="div2"></div>
|
||||
<script>
|
||||
onload = function() {
|
||||
// same origin should be allowed
|
||||
var nodes1 = SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById('div1'));
|
||||
parent.postMessage({test: "sameOriginIsAllowed",
|
||||
result: nodes1 ? nodes1.length : 0,
|
||||
senderURL: "http://mochi.test:8888"}, "*");
|
||||
|
||||
// cross origin should be blocked
|
||||
var nodes2 = SpecialPowers.wrap(document).getAnonymousNodes(document.getElementById('div2'));
|
||||
parent.postMessage({test: "crossOriginIsBlocked",
|
||||
result: nodes2 ? nodes2.length : 0,
|
||||
senderURL: "http://mochi.test:8888"}, "*");
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue