The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in Firefox 7

Status

()

Firefox
Session Restore
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

Trunk
Firefox 7
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Updated

6 years ago
Blocks: 655269
(Assignee)

Comment 1

6 years ago
Created attachment 535038 [details] [diff] [review]
patch v1
Assignee: nobody → tim.taubert
Status: NEW → ASSIGNED
Attachment #535038 - Flags: review?(paul)
(Assignee)

Comment 2

6 years ago
Comment on attachment 535038 [details] [diff] [review]
patch v1

Passed try:

http://tbpl.mozilla.org/?tree=Try&pusher=tim.taubert@gmx.de&rev=b11596fb0686
(Assignee)

Comment 3

6 years ago
Created attachment 537155 [details] [diff] [review]
patch v2
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+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/a1b563094e5a
Whiteboard: [inbound]
Backed out due to mochitest-other orange.
Whiteboard: [inbound]
(Assignee)

Comment 7

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/92f4836116a3
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/92f4836116a3
Status: ASSIGNED → RESOLVED
Last Resolved: 6 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.