mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +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
30
js/xpconnect/tests/mochitest/chrome_wrappers_helper.html
Normal file
30
js/xpconnect/tests/mochitest/chrome_wrappers_helper.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function check_wrapper(ok, wrapper, expected, note) {
|
||||
|
||||
var utils = SpecialPowers.DOMWindowUtils;
|
||||
ok(utils.getClassName(wrapper) === expected, note);
|
||||
}
|
||||
function run_test(ok, xpcnw, sjow) {
|
||||
// both wrappers should point to our window: XOW
|
||||
check_wrapper(ok, ok, "Proxy", "functions are wrapped properly")
|
||||
check_wrapper(ok, xpcnw, "Proxy", "XPCNWs are transformed correctly");
|
||||
check_wrapper(ok, sjow, "Proxy", "SJOWs are transformed correctly");
|
||||
|
||||
check_wrapper(ok, window.location, "Proxy",
|
||||
"Content needs a same-compartment security wrappers around location");
|
||||
|
||||
ok(defprop1 === 1, "defprop1 exists");
|
||||
window.defprop1 = 2;
|
||||
ok(defprop1 === 2, "defprop1 is properly writable");
|
||||
|
||||
// defprop2 = {}; disabled because the test doesn't work
|
||||
}
|
||||
|
||||
window.xhr = new XMLHttpRequest();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue