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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/
     3  */
     5 // Bug 679604 - Test that a XUL persisted category from an older version of
     6 // Firefox doesn't break the add-ons manager when that category doesn't exist
     8 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
    10 var gManagerWindow;
    12 function test() {
    13   waitForExplicitFinish();
    15   open_manager(null, function(aWindow) {
    16     var categories = aWindow.document.getElementById("categories");
    17     categories.setAttribute("last-selected", "foo");
    18     aWindow.document.persist("categories", "last-selected");
    20     close_manager(aWindow, function() {
    21       Services.prefs.clearUserPref(PREF_UI_LASTCATEGORY);
    23       open_manager(null, function(aWindow) {
    24         is(new CategoryUtilities(aWindow).selectedCategory, "discover",
    25            "Should have loaded the right view");
    27         close_manager(aWindow, finish);
    28       });
    29     });
    30   });
    31 }

mercurial