The default bug view has changed. See this FAQ.

Provide 'ss' centrally for all browser-chrome sessionstore tests

VERIFIED FIXED in Firefox 7

Status

()

Firefox
Session Restore
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: dao, Assigned: dao)

Tracking

Trunk
Firefox 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 541935 [details] [diff] [review]
patch
Attachment #541935 - Flags: review?(paul)
Comment on attachment 541935 [details] [diff] [review]
patch

I was going to go the opposite direction with bug 664325, but this works too. Make ss a const and we're good.
Attachment #541935 - Flags: review?(paul) → review+
Duplicate of this bug: 664325
(Assignee)

Comment 3

6 years ago
It's intentionally not a const, so that the scope can be cleared after each test.

Comment 4

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

>diff --git a/browser/components/sessionstore/test/browser/browser_350525.js b/browser/components/sessionstore/test/browser/browser_350525.js
>--- a/browser/components/sessionstore/test/browser/browser_350525.js
>+++ b/browser/components/sessionstore/test/browser/browser_350525.js
>@@ -3,29 +3,19 @@ function test() {
>   
>   function test(aLambda) {
>     try {
>       return aLambda() || true;
>     }
>     catch (ex) { }
>     return false;
>   }
>-  
>-  // test setup
>-  let tabbrowser = gBrowser;
>+
>   waitForExplicitFinish();
>-  
>-  // component
>-  let ssComponent = test(function() Cc["@mozilla.org/browser/sessionstore;1"]);
>-  ok(ssComponent, "reference the sessionstore component");
>-  
>-  // service
>-  let ss = test(function() ssComponent.getService(Ci.nsISessionStore));
>-  ok(ss, "reference the sessionstore service");
>-  
>+

This one looks odd to me as the test _was_ the check of references to the component and service.
(Assignee)

Comment 5

6 years ago
The check was pointless. No sessionstore test would pass if the service wasn't available.
(Assignee)

Comment 6

6 years ago
http://hg.mozilla.org/mozilla-central/rev/e62b80fd8cb6
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7

Updated

6 years ago
Blocks: 669077

Comment 7

6 years ago
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110706 Firefox/7.0a2
Verified fixed - detailed by the changest in comment 6.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.