test_cachemiss.html fails when run twice in the same session because its gethash server completions are never cleared
Categories
(Toolkit :: Safe Browsing, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(1 external file)
toolkit/components/url-classifier/tests/mochitest/test_cachemiss.html stores full-hash completions in the shared state of cache.sjs in testPositiveCache, and nothing clears them. When the test runs a second time in the same harness session (the upcoming mochitest-plain-repeat jobs, --verify), the gethash server returns those completions to testNegativeCache. The resources that case expects to load get blocked, which fails "Should load bad javascript", "Should load bad css" and "Should import bad css". This is also why the test has a verify-standalone skip-if.
The fix adds the ?reset= handler that gethash.sjs already has to cache.sjs, and the test's reset() now clears the stored completions. It also removes the skip-if.
| Assignee | ||
Comment 1•7 days ago
|
||
The completions added to cache.sjs by testPositiveCache persisted across runs, so on a second run testNegativeCache got them back from gethash and the resources it expects to load were blocked. The verify-standalone skip-if (bug 1995208) was for this.
Comment 3•4 days ago
|
||
| bugherder | ||
Description
•