Closed
Bug 455278
Opened 16 years ago
Closed 16 years ago
chrome mochitest redirect fails in fennec
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: blassey, Assigned: Gavin)
References
Details
Attachments
(1 file, 1 obsolete file)
897 bytes,
patch
|
sayrer
:
review+
|
Details | Diff | Splinter Review |
error is:
Error: win.getWebNavigation is not a function
Source File: http://localhost:8888/redirect.js
Line: 51
the js that is failing is:
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);
Assignee | ||
Comment 1•16 years ago
|
||
The easy fix would be to add the getWebNavigation() helper to fennec chrome (we'll probably end up doing that anyways for Firefox extension compat), but perhaps we should fix that mochitest code to use something more generic. I think the following would work:
let webNav = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.treeOwner.primaryContentShell
.QueryInterface(Ci.nsIWebNavigation);
Reporter | ||
Comment 2•16 years ago
|
||
for some reason using let doesn't work.
Attachment #338635 -
Flags: review?
Reporter | ||
Updated•16 years ago
|
Attachment #338635 -
Flags: review? → review?(robert_sayre)
Reporter | ||
Updated•16 years ago
|
Attachment #338635 -
Flags: review?(robert_sayre) → review?(sayrer)
Comment 3•16 years ago
|
||
Comment on attachment 338635 [details] [diff] [review]
gavin's code as a patch
Shouldn't that be |win| instead of |window|? Or do you really want to run it againstd the current window as opposed to the most recent navigator window?
let probably didn't work because this stuff is not being loaded right; that's worth filing a bug on.
Assignee | ||
Comment 4•16 years ago
|
||
Yeah, it should be win.
Assignee | ||
Comment 5•16 years ago
|
||
Actually, this file is loaded in the content docshell anyways, so we can just use window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) directly. Or maybe even just set document.location? I guess that might run into security checks.
Assignee | ||
Updated•16 years ago
|
Component: General → Testing
OS: Linux → All
Product: Fennec → Core
QA Contact: general → testing
Hardware: PC → All
Assignee | ||
Comment 6•16 years ago
|
||
Assignee: nobody → gavin.sharp
Attachment #338635 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #339323 -
Flags: review?(sayrer)
Attachment #338635 -
Flags: review?(sayrer)
Assignee | ||
Comment 7•16 years ago
|
||
I'll add this comment:
// Can't just set window.location because of security restrictions
// that don't care about our UniversalXPConnectness
Updated•16 years ago
|
Attachment #339323 -
Flags: review?(sayrer) → review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 8•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
Updated•16 years ago
|
Component: Testing → Chrome
Product: Core → Testing
QA Contact: testing → chrome
Target Milestone: mozilla1.9.1b1 → ---
Version: Trunk → unspecified
Updated•7 years ago
|
Component: Mochitest Chrome → Mochitest
You need to log in
before you can comment on or make changes to this bug.
Description
•