Closed
Bug 414303
Opened 17 years ago
Closed 17 years ago
Allow docshell/test/navigation tests to run in embedding builds
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mozilla, Assigned: abarth-mozilla)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
The frame navigation tests added in bug 408052 assume they're being run on Firefox. When using nsIWindowWatcher to find open windows, the tests assume they're getting a Chrome window and reach inside to find the gBrowser. However, the gBrowser won't be there on embedding builds -- apparently nsIWindowWatcher will return a content window instead. We should detect whether the window watcher gave us a ChromeWindow or a content window to decide whether to find its child windows.
(Ideally, it would be nice if nsIWindowWatcher had some way to enumerate content windows directly, but perhaps that's too much to ask.)
Comment 1•17 years ago
|
||
Yeah, windowwatcher basically just returns what people tell it about, and XUL-based apps tell it about the toplevel XUL windows. And it's frozen, more the fun.
Assignee | ||
Comment 2•17 years ago
|
||
Based on comments from bz, we think this patch will let the tests will work in embedded builds, but we aren't sure how to run the tests in that mode.
Attachment #299701 -
Flags: review?(bzbarsky)
Comment 3•17 years ago
|
||
Hmm... For ChromeWindow, I'd prefer we stick with the gBrowser thing or something. frames could include all sorts of random UI stuff, in the future...
And there's no obvious way yet to run mochitests in an embedding build, sadly. But the "else" branches look fine. ;)
Assignee | ||
Comment 4•17 years ago
|
||
Ok. This patch uses gBrowser to find the content windows. We're still using instanceof ChromeWindow to detect whether we've got a ChromeWindow because sometimes (due to race conditions) we see a ChromeWindow before it has a gBrowser object. In those cases, its safe to ignore the window because we'll catch it on the next call to poll().
Attachment #299701 -
Attachment is obsolete: true
Attachment #299705 -
Flags: review?(bzbarsky)
Attachment #299701 -
Flags: review?(bzbarsky)
Comment 5•17 years ago
|
||
Comment on attachment 299705 [details] [diff] [review]
Updated patch for NavigationUtils.js
This looks great. Thanks for doing it!
Attachment #299705 -
Flags: superreview+
Attachment #299705 -
Flags: review?(bzbarsky)
Attachment #299705 -
Flags: review+
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•