Backing out a patch that has been accidentally pushed with a merge. a=backout
This commit is contained in:
@@ -355,7 +355,7 @@ function test9()
|
||||
gBrowser.removeTab(tab, {animate: false});
|
||||
|
||||
// Next test
|
||||
executeSoon(test10);
|
||||
executeSoon(finish);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -372,38 +372,3 @@ function test9()
|
||||
|
||||
tab.linkedBrowser.loadURI(uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* In this test, we check that the author defined error message is shown.
|
||||
*/
|
||||
function test10()
|
||||
{
|
||||
let uri = "data:text/html,<iframe name='t'></iframe><form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>";
|
||||
let tab = gBrowser.addTab();
|
||||
|
||||
gInvalidFormPopup.addEventListener("popupshown", function() {
|
||||
gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);
|
||||
|
||||
let doc = gBrowser.contentDocument;
|
||||
is(doc.activeElement, doc.getElementById('i'),
|
||||
"First invalid element should be focused");
|
||||
|
||||
checkPopupShow();
|
||||
|
||||
is(gInvalidFormPopup.firstChild.nodeValue, "foo",
|
||||
"The panel should show the author defined error message");
|
||||
|
||||
// Clean-up and next test.
|
||||
gBrowser.removeTab(gBrowser.selectedTab, {animate: false});
|
||||
executeSoon(finish);
|
||||
}, false);
|
||||
|
||||
tab.linkedBrowser.addEventListener("load", function(aEvent) {
|
||||
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
gBrowser.contentDocument.getElementById('s').click();
|
||||
}, true);
|
||||
|
||||
gBrowser.selectedTab = tab;
|
||||
gBrowser.selectedTab.linkedBrowser.loadURI(uri);
|
||||
}
|
||||
|
||||
@@ -588,7 +588,6 @@ GK_ATOM(mouseover, "mouseover")
|
||||
GK_ATOM(mousethrough, "mousethrough")
|
||||
GK_ATOM(mouseup, "mouseup")
|
||||
GK_ATOM(moz_opaque, "moz-opaque")
|
||||
GK_ATOM(x_moz_errormessage, "x-moz-errormessage")
|
||||
GK_ATOM(msthemecompatible, "msthemecompatible")
|
||||
GK_ATOM(multicol, "multicol")
|
||||
GK_ATOM(multiple, "multiple")
|
||||
|
||||
@@ -78,16 +78,7 @@ nsIConstraintValidation::GetValidationMessage(nsAString& aValidationMessage)
|
||||
aValidationMessage.Truncate();
|
||||
|
||||
if (IsCandidateForConstraintValidation() && !IsValid()) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(this);
|
||||
NS_ASSERTION(content, "This class should be inherited by HTML elements only!");
|
||||
|
||||
nsAutoString authorMessage;
|
||||
content->GetAttr(kNameSpaceID_None, nsGkAtoms::x_moz_errormessage,
|
||||
authorMessage);
|
||||
|
||||
if (!authorMessage.IsEmpty()) {
|
||||
aValidationMessage.Assign(authorMessage);
|
||||
} else if (GetValidityState(VALIDITY_STATE_CUSTOM_ERROR)) {
|
||||
if (GetValidityState(VALIDITY_STATE_CUSTOM_ERROR)) {
|
||||
aValidationMessage.Assign(mCustomValidity);
|
||||
} else if (GetValidityState(VALIDITY_STATE_TOO_LONG)) {
|
||||
GetValidationMessage(aValidationMessage, VALIDITY_STATE_TOO_LONG);
|
||||
|
||||
@@ -230,7 +230,6 @@ _TEST_FILES = \
|
||||
test_bug557087-4.html \
|
||||
test_bug557087-5.html \
|
||||
test_bug557087-6.html \
|
||||
test_bug600155.html \
|
||||
test_bug598643.html \
|
||||
test_bug596350.html \
|
||||
$(NULL)
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=600155
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 600155</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=600155">Mozilla Bug 600155</a>
|
||||
<p id="display"></p>
|
||||
<div id='content' style='display:none;'>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 600155 **/
|
||||
|
||||
var subjectForConstraintValidation = [ "button", "input", "select", "textarea" ];
|
||||
var content = document.getElementById('content');
|
||||
|
||||
for each (var eName in subjectForConstraintValidation) {
|
||||
var e = document.createElement(eName);
|
||||
content.appendChild(e);
|
||||
e.setAttribute("x-moz-errormessage", "foo");
|
||||
if ("required" in e) {
|
||||
e.required = true;
|
||||
} else {
|
||||
e.setCustomValidity("bar");
|
||||
}
|
||||
|
||||
// At this point, the element is invalid.
|
||||
is(e.validationMessage, "foo",
|
||||
"the validation message should be the author one");
|
||||
|
||||
content.removeChild(e);
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user