Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
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 }