browser/components/sessionstore/test/unit/test_startup_nosession_async.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/sessionstore/test/unit/test_startup_nosession_async.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,22 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +
     1.8 +// Test nsISessionStartup.sessionType in the following scenario:
     1.9 +// - no sessionstore.js;
    1.10 +// - the session store has been loaded, so no need to go
    1.11 +//    through the synchronous fallback
    1.12 +
    1.13 +function run_test() {
    1.14 +  do_get_profile();
    1.15 +  // Initialize the profile (the session startup uses it)
    1.16 +
    1.17 +  do_test_pending();
    1.18 +  let startup = Cc["@mozilla.org/browser/sessionstartup;1"].
    1.19 +    getService(Ci.nsISessionStartup);
    1.20 +
    1.21 +  afterSessionStartupInitialization(function cb() {
    1.22 +    do_check_eq(startup.sessionType, Ci.nsISessionStartup.NO_SESSION);
    1.23 +    do_test_finished();
    1.24 +  });
    1.25 +}
    1.26 \ No newline at end of file

mercurial