|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ |
|
3 */ |
|
4 |
|
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 |
|
7 |
|
8 const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory"; |
|
9 |
|
10 var gManagerWindow; |
|
11 |
|
12 function test() { |
|
13 waitForExplicitFinish(); |
|
14 |
|
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"); |
|
19 |
|
20 close_manager(aWindow, function() { |
|
21 Services.prefs.clearUserPref(PREF_UI_LASTCATEGORY); |
|
22 |
|
23 open_manager(null, function(aWindow) { |
|
24 is(new CategoryUtilities(aWindow).selectedCategory, "discover", |
|
25 "Should have loaded the right view"); |
|
26 |
|
27 close_manager(aWindow, finish); |
|
28 }); |
|
29 }); |
|
30 }); |
|
31 } |