Bug 661256 - Port patch from bug 660200 to content/html/content/test/test_bug657938.html. r=mounir

This commit is contained in:
Vincent LAMOTTE 2011-06-08 20:33:13 +02:00
parent 07e5c05d48
commit 8110f43bb5

View File

@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=657938
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=657938">Mozilla Bug 657938</a>
<p id="display"></p>
<iframe name="submit_frame" onload="onFormSubmission();" style="visibility: hidden;"></iframe>
<iframe name="submit_frame" style="visibility: hidden;"></iframe>
<div id="content" style="visibility: hidden;">
<form id='f' method='get' target='submit_frame' action='foo'>
<meter id='m' value=0.5></meter>
@ -321,12 +321,9 @@ function checkNotResetableAndFormSubmission(aElement)
aElement.value = 42.0;
aElement.max = 100.0;
// This is going to call onFormSubmission().
form.submit();
}
document.getElementsByName('submit_frame')[0].addEventListener("load", function() {
document.getElementsByName('submit_frame')[0].removeEventListener("load", arguments.callee, false);
function onFormSubmission()
{
/**
* All elements values have been set just before the submission.
* The input element value should be in the submit url but the meter
@ -337,6 +334,9 @@ function onFormSubmission()
"The meter element value should not be submitted");
checkNotResetable();
}, false);
form.submit();
}
function checkNotResetable()