Last Comment Bug 667202 - Provide 'ss' centrally for all browser-chrome sessionstore tests
: Provide 'ss' centrally for all browser-chrome sessionstore tests
Status: VERIFIED FIXED
:
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 7
Assigned To: Dão Gottwald [:dao]
:
Mentors:
: 664325 (view as bug list)
Depends on:
Blocks: 669077
  Show dependency treegraph
 
Reported: 2011-06-25 08:49 PDT by Dão Gottwald [:dao]
Modified: 2011-07-07 08:02 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (63.85 KB, patch)
2011-06-25 08:49 PDT, Dão Gottwald [:dao]
paul: review+
Details | Diff | Review

Description Dão Gottwald [:dao] 2011-06-25 08:49:28 PDT
Created attachment 541935 [details] [diff] [review]
patch
Comment 1 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-25 10:40:38 PDT
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.
Comment 2 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-06-25 10:41:14 PDT
*** Bug 664325 has been marked as a duplicate of this bug. ***
Comment 3 Dão Gottwald [:dao] 2011-06-25 12:02:31 PDT
It's intentionally not a const, so that the scope can be cleared after each test.
Comment 4 John P Baker 2011-06-27 05:23:46 PDT
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.
Comment 5 Dão Gottwald [:dao] 2011-06-27 05:35:23 PDT
The check was pointless. No sessionstore test would pass if the service wasn't available.
Comment 6 Dão Gottwald [:dao] 2011-06-27 08:53:08 PDT
http://hg.mozilla.org/mozilla-central/rev/e62b80fd8cb6
Comment 7 AndreiD[QA] 2011-07-07 08:02:40 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.