Issue #1366 - Completely remove showModalDialog

This commit is contained in:
Gaming4JC 2020-01-21 20:00:48 -05:00 committed by Roy Tam
commit 8d600c51ed
38 changed files with 14 additions and 1313 deletions

View file

@ -306,28 +306,6 @@ function runtestsInner()
w.close();
// Test that showModalDialog() works normally and then gets blocked
// on the second call.
if (window.showModalDialog) {
w = window.open();
w.showModalDialog("data:text/html,%3Cscript>window.close();%3C/script>")
is (promptState, void(0), "Wrong prompt state");
try {
w.showModalDialog("data:text/html,%3Cscript>window.close();%3C/script>")
ok(false, "showModalDialog call should throw an exception");
} catch(e) {
is(e.name, "NS_ERROR_NOT_AVAILABLE", "Wrong exception");
}
is (promptState.method, "confirm", "Wrong prompt method called");
is (promptState.parent, w, "Wrong confirm parent");
is (promptState.msg, "Prevent this page from creating additional dialogs",
"Wrong confirm message");
promptState = void(0);
w.close();
}
mockPromptFactoryRegisterer.unregister();
mockPromptServiceRegisterer.unregister();