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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/
     3  */
     5 // Test that the selected category is persisted across loads of the manager
     7 function test() {
     8   waitForExplicitFinish();
    10   open_manager(null, function(aWindow) {
    11     let utils = new CategoryUtilities(aWindow);
    13     // Open the plugins category
    14     utils.openType("plugin", function() {
    16       // Re-open the manager
    17       close_manager(aWindow, function() {
    18         open_manager(null, function(aWindow) {
    19           utils = new CategoryUtilities(aWindow);
    21           is(utils.selectedCategory, "plugin", "Should have shown the plugins category");
    23           // Open the extensions category
    24           utils.openType("extension", function() {
    26             // Re-open the manager
    27             close_manager(aWindow, function() {
    28               open_manager(null, function(aWindow) {
    29                 utils = new CategoryUtilities(aWindow);
    31                 is(utils.selectedCategory, "extension", "Should have shown the extensions category");
    32                 close_manager(aWindow, finish);
    33               });
    34             });
    35           });
    36         });
    37       });
    38     });
    39   });
    40 }

mercurial