Bug 782227 - Add a todo() when there is no invalid form submission observer (content/ tests). r=Ms2ger
authorMounir Lamouri <mounir.lamouri@gmail.com>
Mon, 13 Aug 2012 12:14:34 +0200
changeset 102208 292d68f4476fbf526e9e19ed56b964890593e385
parent 102207 6a0b53d784651bfa841b791cd50bd91ccf5a1425
child 102209 154fa794a1aa040bbd3e90943c3df2f2681e75a8
push id23269
push useremorley@mozilla.com
push dateMon, 13 Aug 2012 18:08:43 +0000
treeherdermozilla-central@75cdb3f932c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs782227
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 782227 - Add a todo() when there is no invalid form submission observer (content/ tests). r=Ms2ger
content/html/content/test/forms/test_formnovalidate_attribute.html
content/html/content/test/test_bug605124-1.html
content/html/content/test/test_bug605125-1.html
--- a/content/html/content/test/forms/test_formnovalidate_attribute.html
+++ b/content/html/content/test/forms/test_formnovalidate_attribute.html
@@ -56,17 +56,16 @@ var observers = os.enumerateObservers("i
  * used to submit the form.
  *
  * The following test should not be done if there is no observer for
  * "invalidformsubmit" because the form submission will not be canceled in that
  * case.
  */
 
 if (observers.hasMoreElements()) {
-
   document.getElementById('av').addEventListener("invalid", function(aEvent) {
     aEvent.target.removeAttribute("invalid", arguments.callee, false);
     ok(true, "formnovalidate should not apply on if not set on the submit " +
              "control used for the submission");
     document.getElementById('b').click();
   }, false);
 
   document.getElementById('bv').addEventListener("invalid", function(aEvent) {
@@ -128,14 +127,16 @@ if (observers.hasMoreElements()) {
   document.forms[2].addEventListener("submit", unexpectedSubmit, false);
 
   SimpleTest.waitForExplicitFinish();
 
   // This is going to call all the tests (with a chain reaction).
   SimpleTest.waitForFocus(function() {
     document.getElementById('a').click();
   });
+} else {
+  todo(false, "No 'invalidformsubmit' observers. Skip test.");
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/html/content/test/test_bug605124-1.html
+++ b/content/html/content/test/test_bug605124-1.html
@@ -93,14 +93,16 @@ if (observers.hasMoreElements()) {
   checkPseudoClass(input, true);
   checkPseudoClass(select, true);
 
   // Remove the form.
   document.getElementsByTagName('table')[0].removeChild(form);
   checkPseudoClass(textarea, false);
   checkPseudoClass(input, false);
   checkPseudoClass(select, false);
+} else {
+  todo(false, "No 'invalidformsubmit' observers. Skip test.");
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/content/html/content/test/test_bug605125-1.html
+++ b/content/html/content/test/test_bug605125-1.html
@@ -99,14 +99,16 @@ if (observers.hasMoreElements()) {
   checkPseudoClass(input, true);
   checkPseudoClass(select, true);
 
   // Remove the form.
   document.getElementsByTagName('table')[0].removeChild(form);
   checkPseudoClass(textarea, false);
   checkPseudoClass(input, false);
   checkPseudoClass(select, false);
+} else {
+  todo(false, "No 'invalidformsubmit' observers. Skip test.");
 }
 
 </script>
 </pre>
 </body>
 </html>