michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: // Test that the selected category is persisted across loads of the manager michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: open_manager(null, function(aWindow) { michael@0: let utils = new CategoryUtilities(aWindow); michael@0: michael@0: // Open the plugins category michael@0: utils.openType("plugin", function() { michael@0: michael@0: // Re-open the manager michael@0: close_manager(aWindow, function() { michael@0: open_manager(null, function(aWindow) { michael@0: utils = new CategoryUtilities(aWindow); michael@0: michael@0: is(utils.selectedCategory, "plugin", "Should have shown the plugins category"); michael@0: michael@0: // Open the extensions category michael@0: utils.openType("extension", function() { michael@0: michael@0: // Re-open the manager michael@0: close_manager(aWindow, function() { michael@0: open_manager(null, function(aWindow) { michael@0: utils = new CategoryUtilities(aWindow); michael@0: michael@0: is(utils.selectedCategory, "extension", "Should have shown the extensions category"); michael@0: close_manager(aWindow, finish); michael@0: }); michael@0: }); michael@0: }); michael@0: }); michael@0: }); michael@0: }); michael@0: }); michael@0: }