1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/tests/unit/test_wwpromptfactory.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +function run_test() { 1.5 + // Make sure that getting both nsIAuthPrompt and nsIAuthPrompt2 works 1.6 + // (these should work independently of whether the application has 1.7 + // nsIPromptService2) 1.8 + var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] 1.9 + .getService(); 1.10 + 1.11 + var prompt; 1.12 + 1.13 + prompt = ww.nsIWindowWatcher.getNewPrompter(null); 1.14 + do_check_neq(prompt, null); 1.15 + prompt = ww.nsIWindowWatcher.getNewAuthPrompter(null); 1.16 + do_check_neq(prompt, null); 1.17 + 1.18 + prompt = ww.nsIPromptFactory.getPrompt(null, 1.19 + Components.interfaces.nsIPrompt); 1.20 + do_check_neq(prompt, null); 1.21 + prompt = ww.nsIPromptFactory.getPrompt(null, 1.22 + Components.interfaces.nsIAuthPrompt); 1.23 + do_check_neq(prompt, null); 1.24 + prompt = ww.nsIPromptFactory.getPrompt(null, 1.25 + Components.interfaces.nsIAuthPrompt2); 1.26 + do_check_neq(prompt, null); 1.27 +}