Closed
Bug 1316606
Opened 8 years ago
Closed 8 years ago
dom/html/test/forms/test_save_restore_radio_groups.html fails to run twice in the same browser session
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: jmaher, Assigned: jmaher)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
835 bytes,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
in experimenting with a possible new test verification job, I examined existing tests and realized that many do not run >1 time in the same browser session:
./mach mochitest dom/html/test/forms/test_save_restore_radio_groups.html --repeat 1
we get many errors, this is easy to reproduce locally and on try with some hacking of the mochitest harness.
in this case we have a .sjs file which is static and we load/reload it a few times while a counter is incremented inside of the .sjs file. Here we can reset the counter and allow this test to run over and over again without harm.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
:jet, I asked you for review since I could not determine who else owns this test and you are listed as the bug triage for core::dom&html
Comment 3•8 years ago
|
||
You should probably ask Boris for review as he reviewed Mounir's initial work on dom/html/test/forms/test_save_restore_radio_groups.html in bug 350022.
Updated•8 years ago
|
Assignee: nobody → jmaher
Comment 4•8 years ago
|
||
Comment on attachment 8809440 [details]
Bug 1316606 - fix test_save_restore_radio_groups.html to be run multiple times in the same browser.
Maybe Mounir has time to do a quick review?
Attachment #8809440 -
Flags: review?(bugs) → review?(mounir)
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8809440 [details]
Bug 1316606 - fix test_save_restore_radio_groups.html to be run multiple times in the same browser.
https://reviewboard.mozilla.org/r/92036/#review92548
::: dom/html/test/forms/save_restore_radio_groups.sjs:46
(Diff revision 1)
> }
> +
> + // When we finish the test case we need to reset the counter
> + if (counter == 3) {
> + counter = -1;
> + }
Instead of setting `counter` to `-1`, could you call `setState("counter", "0");` when `counter == 3`?
Attachment #8809440 -
Flags: review?(mounir)
Assignee | ||
Comment 6•8 years ago
|
||
updated and tested locally, thanks for the great (and should have been obvious) recommendation to fix this.
Attachment #8809440 -
Attachment is obsolete: true
Attachment #8810503 -
Flags: review?(mounir)
Comment 7•8 years ago
|
||
Comment on attachment 8810503 [details] [diff] [review]
use setState() to reset the test to run multiple times
Review of attachment 8810503 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with comment applied. Thanks for fixing this :)
::: dom/html/test/forms/save_restore_radio_groups.sjs
@@ +41,5 @@
> }
> +
> + // When we finish the test case we need to reset the counter
> + if (counter == 3) {
> + setState("counter", "" + 0);
I think you should be able to set to `"0"` instead of `"" + 0`.
Attachment #8810503 -
Flags: review?(mounir) → review+
Pushed by jmaher@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/355aec7f1abe
fix test_save_restore_radio_groups.html to be run multiple times in the same browser. r=mounir
Comment 9•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 10•8 years ago
|
||
bugherder uplift |
status-firefox52:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•