Bug 1316606 - fix test_save_restore_radio_groups.html to be run multiple times in the same browser. r=mounir
authorJoel Maher <jmaher@mozilla.com>
Tue, 15 Nov 2016 13:26:34 -0500
changeset 350764 355aec7f1abec8f42fe12c93dda494e70dd7fb1e
parent 350763 741ff57b2407d7245354ec4688ce9e12e218ba05
child 350765 e4e19a28e8af70b9de83f3d8dbf9f5e062720691
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs1316606
milestone53.0a1
Bug 1316606 - fix test_save_restore_radio_groups.html to be run multiple times in the same browser. r=mounir MozReview-Commit-ID: b1v8Of0BRJ
dom/html/test/forms/save_restore_radio_groups.sjs
--- a/dom/html/test/forms/save_restore_radio_groups.sjs
+++ b/dom/html/test/forms/save_restore_radio_groups.sjs
@@ -34,11 +34,17 @@ function handleRequest(request, response
     case 1:
       response.write(pages[0]);
       break;
     case 2:
     case 3:
       response.write(pages[1]);
       break;
   }
-  setState("counter", "" + ++counter);
+
+  // When we finish the test case we need to reset the counter
+  if (counter == 3) {
+    setState("counter", "0");
+  } else {
+    setState("counter", "" + ++counter);
+  }
 }