diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/xpconnect/tests/mochitest/file_documentdomain.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/xpconnect/tests/mochitest/file_documentdomain.html')
-rw-r--r-- | js/xpconnect/tests/mochitest/file_documentdomain.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/js/xpconnect/tests/mochitest/file_documentdomain.html b/js/xpconnect/tests/mochitest/file_documentdomain.html new file mode 100644 index 000000000..784ed269d --- /dev/null +++ b/js/xpconnect/tests/mochitest/file_documentdomain.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html> +<head> +<script type="application/javascript"> + + function setDomain(domain) { + document.domain = domain; + } + + function tryToAccess(otherWin) { + try { + var text = otherWin.document.getElementById('foo').innerHTML; + return /Better Late/.exec(text); + } catch (e) { return false; } + } + + var gRef = null; + function storeReference(otherWin) { + gRef = otherWin.document.getElementById('foo'); + } + + function tryToAccessStored() { + try { + return /Better Late/.exec(gRef.innerHTML); + } catch (e) { return false; } + } + + function invokingFunctionThrowsSecurityException(name) { + try { + window[name](); + return false; + } catch (e) { return /insecure|denied/.test(e); } + } + + +</script> +</head> +<body> +<span id="foo">Better Late than Never</span> +</body> +</html> |