mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-19 05:37:30 +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
37
dom/html/test/bug196523-subframe.html
Normal file
37
dom/html/test/bug196523-subframe.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
function checkDomain(str, msg) {
|
||||
window.parent.postMessage((str == document.domain) + ";" +msg,
|
||||
"http://mochi.test:8888");
|
||||
}
|
||||
|
||||
function reportException(msg) {
|
||||
window.parent.postMessage(false + ";" + msg, "http://mochi.test:8888");
|
||||
}
|
||||
|
||||
var win1;
|
||||
try {
|
||||
win1 = window.open("", "", "width=100,height=100");
|
||||
var otherDomain1 = win1.document.domain;
|
||||
win1.close();
|
||||
checkDomain(otherDomain1, "Opened document should have our domain");
|
||||
} catch(e) {
|
||||
reportException("Exception getting document.domain: " + e);
|
||||
} finally {
|
||||
win1.close();
|
||||
}
|
||||
|
||||
document.domain = "example.org";
|
||||
|
||||
var win2;
|
||||
try {
|
||||
win2 = window.open("", "", "width=100,height=100");
|
||||
var otherDomain2 = win2.document.domain;
|
||||
checkDomain(otherDomain2, "Opened document should have our domain");
|
||||
win2.close();
|
||||
} catch(e) {
|
||||
reportException("Exception getting document.domain after domain set: " + e);
|
||||
} finally {
|
||||
win2.close();
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue