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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kairo, Assigned: kairo)

References

Details

Attachments

(1 file)

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.
Attached patch just null-check win.location (deleted) — Splinter Review
This patch fixes those tests here by simply null-checking win.location.
Assignee: nobody → kairo
Status: NEW → ASSIGNED
Attachment #460915 - Flags: review?(bzbarsky)
Comment on attachment 460915 [details] [diff] [review] just null-check win.location r=me. Good catch.
Attachment #460915 - Flags: review?(bzbarsky) → review+
Thanks for the fast review, pushed as http://hg.mozilla.org/mozilla-central/f9ce465b7276
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I've no idea why you're getting null location. I expect and see about:blank
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.

Attachment

General

Creator:
Created:
Updated:
Size: