michael@0: function run_test() { michael@0: // Make sure that getting both nsIAuthPrompt and nsIAuthPrompt2 works michael@0: // (these should work independently of whether the application has michael@0: // nsIPromptService2) michael@0: var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] michael@0: .getService(); michael@0: michael@0: var prompt; michael@0: michael@0: prompt = ww.nsIWindowWatcher.getNewPrompter(null); michael@0: do_check_neq(prompt, null); michael@0: prompt = ww.nsIWindowWatcher.getNewAuthPrompter(null); michael@0: do_check_neq(prompt, null); michael@0: michael@0: prompt = ww.nsIPromptFactory.getPrompt(null, michael@0: Components.interfaces.nsIPrompt); michael@0: do_check_neq(prompt, null); michael@0: prompt = ww.nsIPromptFactory.getPrompt(null, michael@0: Components.interfaces.nsIAuthPrompt); michael@0: do_check_neq(prompt, null); michael@0: prompt = ww.nsIPromptFactory.getPrompt(null, michael@0: Components.interfaces.nsIAuthPrompt2); michael@0: do_check_neq(prompt, null); michael@0: }