Closed Bug 659591 Opened 13 years ago Closed 13 years ago

Fire SSWindowClosing when session store handles a closing window (on domwindowclosed)

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 7

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

Attachments

(1 file, 1 obsolete file)

From bug 655269 comment #7:

So we should probably do like what we do for tabs (SSTabClosing), which is fired at the beginning of sessionstore processing the TabClose event. We can add SSWindowClosing.
Blocks: 655269
Attached patch patch v1 (obsolete) — Splinter Review
Assignee: nobody → tim.taubert
Status: NEW → ASSIGNED
Attachment #535038 - Flags: review?(paul)
Attached patch patch v2Splinter Review
Attachment #535038 - Attachment is obsolete: true
Attachment #535038 - Flags: review?(paul)
Attachment #537155 - Flags: review?(paul)
Comment on attachment 537155 [details] [diff] [review]
patch v2

Review of attachment 537155 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/sessionstore/test/browser/browser_659591.js
@@ +6,5 @@
> +
> +  newWindow(function (win) {
> +    win.addEventListener("SSWindowClosing", function onWindowClosing() {
> +      win.removeEventListener("SSWindowClosing", onWindowClosing, false);
> +      waitForFocus(finish);

Let's make is so there's actually a test that passes. Have a variable (gotEvent or something) defaulted to false. Set to true in the SSWindowClosing handler, then register a cleanup function that checks ok(gotEvent).

That way we'll at least have a passing test and if it fails, it won't just be a timeout, we'll actually see a failed test.
Attachment #537155 - Flags: review?(paul) → review+
Backed out due to mochitest-other orange.
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/92f4836116a3
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: