mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
051ea1ec66
The |ok| parent check goes away because it's ill-conceived. All it's really checking is that proxies are parented to the global, and it's impossible to port to SpecialPowers, because SpecialPowers will think that the proxy is parented to the SpecialPowers global. I don't think this check is very important, so I removed it.
36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<script>
|
|
function check_wrapper(ok, wrapper, expected, note) {
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
var utils = SpecialPowers.DOMWindowUtils;
|
|
ok(utils.getClassName(wrapper) === expected, note);
|
|
}
|
|
function check_parent(ok, obj, expected, note) {
|
|
var utils = SpecialPowers.DOMWindowUtils;
|
|
ok(utils.getParent(obj) === 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>
|