blob: 80e2be97d41e4891c4a65e18d46630f102eb8626 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>
|