var gInvalidFormPopup = document.getElementById('invalid-form-popup'); ok(gInvalidFormPopup, "The browser should have a popup to show when a form is invalid"); function checkPopupShow() { ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open', "[Test " + testId + "] The invalid form popup should be shown"); } function checkPopupHide() { ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open', "[Test " + testId + "] The invalid form popup should not be shown"); } function checkPopupMessage(doc) { is(gInvalidFormPopup.firstChild.textContent, doc.getElementById('i').validationMessage, "[Test " + testId + "] The panel should show the message from validationMessage"); } let gObserver = { QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]), notifyInvalidSubmit : function (aFormElement, aInvalidElements) { } }; function getDocHeader() { return "data:text/html,
" + getEmptyFrame(); } function getDocFooter() { return ""; } function getEmptyFrame() { return "