Closed Bug 496782 Opened 15 years ago Closed 15 years ago

browser_sanitizeDialog.js calls finish() twice

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3.6a1

People

(Reporter: Gavin, Assigned: adw)

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1rc1])

Attachments

(1 file)

I discovered this while working on bug 492467. That patch changes the browser chrome test harness to output test results as they are generated, instead of lumping them all together in one big dump() at the end.

browser_sanitizeDialog.js seems to be calling finish() twice, and running tests after the first call to finish() (i.e. after we've run a few subsequent tests). The problem here seems to be the last test specifically, which triggers two window openings.

One easy way to see the problem is to add a dump() next to the tests call to finish(), and then run only that test:
runtests.py --browser-chrome --test-path=browser/base/content/test/browser_sanitizeDialog.js --autorun

You'll see the dump() output twice in the log results, once before the log output (i.e. before the first call to finish()) and once after.
Whoops, that last test was added later, and I forgot how my own test works. :O  The problem is that each time the CRH window is closed, doNextTest() is automatically called, which calls finish() if there are no more tests.  The last test opens the window twice => two window closings & no more tests either time => double the finish().  This patch simply breaks the test in two.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Attachment #382017 - Flags: review?(johnath)
Comment on attachment 382017 [details] [diff] [review]
patch
[Checkin: Comment 5]

Makes sense - I've tested this and it does solve the issue.
Attachment #382017 - Flags: review+
Attachment #382017 - Flags: review?(johnath)
Comment on attachment 382017 [details] [diff] [review]
patch
[Checkin: Comment 5]

I think Gavin's review is sufficient...?
Keywords: checkin-needed
Yeah, just wasn't sure whether you cared that johnath look at it specifically.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed1.9.1...]
Target Milestone: --- → Firefox 3.6a1
Whiteboard: [fixed1.9.1...] → [fixed1.9.1rc1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: