Closed
Bug 582657
Opened 14 years ago
Closed 14 years ago
Docshell test failures after SeaMonkey switch to tabbed browsing
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
People
(Reporter: kairo, Assigned: kairo)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The bug 505311 landing to switch SeaMonkey to tabbed browsing by default made some docshell tests in mochitest-plain-2 fail:
215 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_not-opener.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - win.location is null at http://mochi.test:8888/tests/docshell/test/navigation/NavigationUtils.js:180
237 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_reserved.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - win.location is null at http://mochi.test:8888/tests/docshell/test/navigation/NavigationUtils.js:180
250 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_sibling-off-domain.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - win.location is null at http://mochi.test:8888/tests/docshell/test/navigation/NavigationUtils.js:180
I finally tracked that down to the SeaMonkey tab restore function, that keeps the browsers around for some time and restores them from bfcache. If I switch that off (we have a pref for that), the tests pass.
Apparently we keep those docshells around after tabs are closed but those preserved docshells have a null window.location and that's what causes http://mxr.mozilla.org/comm-central/source/mozilla/docshell/test/navigation/NavigationUtils.js#180 to error out.
As we know we can safely ignore those docshells, we can just add a null check there, and that fixes the tests.
Assignee | ||
Comment 1•14 years ago
|
||
This patch fixes those tests here by simply null-checking win.location.
Comment 2•14 years ago
|
||
Comment on attachment 460915 [details] [diff] [review]
just null-check win.location
r=me. Good catch.
Attachment #460915 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•14 years ago
|
||
Thanks for the fast review, pushed as http://hg.mozilla.org/mozilla-central/f9ce465b7276
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 4•14 years ago
|
||
I've no idea why you're getting null location. I expect and see about:blank
Assignee | ||
Comment 5•14 years ago
|
||
Neil, when running those tests _after_ some other tests ran and already loaded and closed tabs, I at least ended up with that function getting docshells with null window.location objects, while with our prefs set to open windows, we don't see those and when I turn off our tab undo cache, I also succeed, so it definitely needs to be something with those browsers we store for undo.
You need to log in
before you can comment on or make changes to this bug.
Description
•