This moves the two remaining browser tests in toolkit/mozapps/downloads/tests to
an xpcshell test and a chrome test. The reason for this change is to remove the
dependency of the browser from download manager tests since it is a toolkit
component.
This version unregisters the factory that we register to override the prompt
service in test_bug_412360.xul so we no longer leak.
r=gavin
--HG--
rename : toolkit/mozapps/downloads/tests/browser/browser_bug_406857.js => toolkit/components/downloads/test/unit/test_bug_406857.js
rename : toolkit/mozapps/downloads/tests/browser/browser_bug_412360.js => toolkit/mozapps/downloads/tests/chrome/test_bug_412360.xul
The test now listens for a "domwindowclosed" notification from the window
watch service instead of using a timer which is unreliable. Upon receiving the
notification, it dispatches an event to the main thread to perform the proper
checks to allow time for any other events listening to that topic to process.
This also adds a utils.js file that download manager chrome tests can use. So
far, only one function has been added that will execute a function on the main
thread; executeSoon.
r=gavin