Closed Bug 462794 Opened 12 years ago Closed 12 years ago

Browser chrome tests for sessionstore closes the browser window

Categories

(Firefox :: Session Restore, defect)

x86
Windows Vista
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 3.1b2

People

(Reporter: ehsan, Assigned: zeniko)

Details

Attachments

(1 file)

I've been seeing this on my machine all the time.  The following command:

python runtests.py --browser-chrome --test-path=browser/components/sessionstore

would start the test and the main browser window would close along the way.  Removing the tests from the Makefile one by one, I once saw this happen with only browser_454908.js in the suite, but I've seen this happen with several other ones even after removing browser_454908.js...
I think Aaron might have some experience with this problem as well, as he wrote the tests for bug 248970.
Can you post some steps to replicate? I have not had this happen.
(In reply to comment #2)
> Can you post some steps to replicate? I have not had this happen.

Like explained in comment 0, here are the STRs:

cd obj-dir/_tests/testing/mochitest
python runtests.py --browser-chrome --test-path=browser/components/sessionstore
Were you using a clean profile for every test run? The test for bug 454908 could close the browser window if browser.sessionstore.max_tabs_undo has been incorrectly set to 0.
Whiteboard: [worksforme?]
(In reply to comment #4)
> Were you using a clean profile for every test run? The test for bug 454908
> could close the browser window if browser.sessionstore.max_tabs_undo has been
> incorrectly set to 0.

Hmmm, I didn't do anything special in this regard...  Isn't a clean profile created for each run of chrome tests automatically?
I'm not sure. I just noted that what's more probably the cause is a single blank tab (instead of a tab with the homepage loaded) which is then automatically closed by undoCloseTab. Could it be that you accidentally blanked the first tab during your testing?
(In reply to comment #6)
> I'm not sure. I just noted that what's more probably the cause is a single
> blank tab (instead of a tab with the homepage loaded) which is then
> automatically closed by undoCloseTab. Could it be that you accidentally blanked
> the first tab during your testing?

This might be it!  On my system, the home page in the testing profile is always about:blank.

I also verified that a new profile is created for each run of browser chrome tests.
This should make the two affected tests more reliable when the testing environment doesn't use a homepage.
Assignee: nobody → zeniko
Status: NEW → ASSIGNED
Attachment #346073 - Flags: review?(dietrich)
Attachment #346073 - Flags: review?(dietrich) → review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/f8f611cb18fe

Thanks for the patch, Simon.  Works great!
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [worksforme?]
Target Milestone: --- → Firefox 3.1b2
Maybe we should set browser.tabs.closeWindowWithLastTab to false for the tests?
You need to log in before you can comment on or make changes to this bug.