mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 455278: make chrome mochitest redirect work in non-firefox apps, r=sayrer
This commit is contained in:
parent
3e0548dbfe
commit
e587de457b
@ -44,10 +44,11 @@ function redirect(aURL)
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
var windowMediator = Cc['@mozilla.org/appshell/window-mediator;1'].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
var win = windowMediator.getMostRecentWindow("navigator:browser");
|
||||
win.getWebNavigation().loadURI(aURL + location.search,
|
||||
null, null, null, null);
|
||||
|
||||
// Can't just set window.location because of security restrictions
|
||||
// that don't care about our UniversalXPConnectness
|
||||
var webNav = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation);
|
||||
webNav.loadURI(aURL + location.search,
|
||||
null, null, null, null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user