Currently, when a preference dialog is closed, it is set to about:blank and reused for the next dialog. This was appropriate when only one dialog could be opened. However this became less than ideal when Bug 1340987 added the ability to open multiple dialogs that stack on top of one another. The closing logic could be simplified by removing the dialog DOM node directly and not resetting it to its initial state. Most of the work will be at editing the tests cases.