toolkit/mozapps/extensions/test/browser/browser_bug567137.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/extensions/test/browser/browser_bug567137.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     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 that the selected category is persisted across loads of the manager
     1.9 +
    1.10 +function test() {
    1.11 +  waitForExplicitFinish();
    1.12 +
    1.13 +  open_manager(null, function(aWindow) {
    1.14 +    let utils = new CategoryUtilities(aWindow);
    1.15 +
    1.16 +    // Open the plugins category
    1.17 +    utils.openType("plugin", function() {
    1.18 +
    1.19 +      // Re-open the manager
    1.20 +      close_manager(aWindow, function() {
    1.21 +        open_manager(null, function(aWindow) {
    1.22 +          utils = new CategoryUtilities(aWindow);
    1.23 +
    1.24 +          is(utils.selectedCategory, "plugin", "Should have shown the plugins category");
    1.25 +
    1.26 +          // Open the extensions category
    1.27 +          utils.openType("extension", function() {
    1.28 +
    1.29 +            // Re-open the manager
    1.30 +            close_manager(aWindow, function() {
    1.31 +              open_manager(null, function(aWindow) {
    1.32 +                utils = new CategoryUtilities(aWindow);
    1.33 +
    1.34 +                is(utils.selectedCategory, "extension", "Should have shown the extensions category");
    1.35 +                close_manager(aWindow, finish);
    1.36 +              });
    1.37 +            });
    1.38 +          });
    1.39 +        });
    1.40 +      });
    1.41 +    });
    1.42 +  });
    1.43 +}

mercurial