import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View 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>