def check_user_prompt_closed_with_exception(dialog_type, retval): session.url = inline("<input/>") create_dialog(dialog_type, text=dialog_type) response = do_print(session, {}) assert_error(response, "unexpected alert open") assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval)
def check_user_prompt_not_closed_but_exception(dialog_type): session.url = inline("<input/>") create_dialog(dialog_type, text=dialog_type) response = do_print(session, {}) assert_error(response, "unexpected alert open") assert session.alert.text == dialog_type session.alert.dismiss()
def check_user_prompt_closed_without_exception(dialog_type, retval): session.url = inline("<input/>") create_dialog(dialog_type, text=dialog_type) response = do_print(session, {}) value = assert_success(response) pdf = base64.decodestring(value) assert_dialog_handled(session, expected_text=dialog_type, expected_retval=retval) assert_pdf(pdf)