|
1 function run_test() { |
|
2 // Make sure that getting both nsIAuthPrompt and nsIAuthPrompt2 works |
|
3 // (these should work independently of whether the application has |
|
4 // nsIPromptService2) |
|
5 var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] |
|
6 .getService(); |
|
7 |
|
8 var prompt; |
|
9 |
|
10 prompt = ww.nsIWindowWatcher.getNewPrompter(null); |
|
11 do_check_neq(prompt, null); |
|
12 prompt = ww.nsIWindowWatcher.getNewAuthPrompter(null); |
|
13 do_check_neq(prompt, null); |
|
14 |
|
15 prompt = ww.nsIPromptFactory.getPrompt(null, |
|
16 Components.interfaces.nsIPrompt); |
|
17 do_check_neq(prompt, null); |
|
18 prompt = ww.nsIPromptFactory.getPrompt(null, |
|
19 Components.interfaces.nsIAuthPrompt); |
|
20 do_check_neq(prompt, null); |
|
21 prompt = ww.nsIPromptFactory.getPrompt(null, |
|
22 Components.interfaces.nsIAuthPrompt2); |
|
23 do_check_neq(prompt, null); |
|
24 } |