Fix dom/tests/mochitest/general/file_frameElementWrapping.html to deal with proxies. r=mrbkap

This commit is contained in:
Peter Van der Beken 2010-09-28 17:02:43 -07:00
parent c9ad413f3a
commit 0148dfb36c
2 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
<html>
<script>
function check(elt, expectXOW, message) {
function check(elt, expectProxy, message) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
var result = ((utils.getClassName(elt) === 'XPCCrossOriginWrapper') === expectXOW)
var result = ((utils.getClassName(elt) === 'Proxy') === expectProxy)
? "PASS"
: "FAIL";

View File

@ -26,7 +26,7 @@ function go() {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
is(utils.getClassName(win), "XPCCrossOriginWrapper", "correctly wrap frame elements");
is(utils.getClassName(win), "Proxy", "correctly wrap frame elements");
})()
SimpleTest.finish();
}