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 367740 355aec7f1abec8f42fe12c93dda494e70dd7fb1e
parent 367739 741ff57b2407d7245354ec4688ce9e12e218ba05
child 367741 e4e19a28e8af70b9de83f3d8dbf9f5e062720691
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs1316606
milestone53.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 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);
+  }
 }