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