Closed Bug 1671973 Opened 4 years ago Closed 4 years ago

Add a test to check that DevTools forceReload bypasses the cache

Categories

(DevTools :: General, task, P3)

task

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1671959

DevTools are forwarding reload shortcuts to the browser, however we regressed the "force reload" in Bug 1465635.

The issue is fixed in Bug 1671959, however we should add a test to avoid regressing this again. I am surprised we didn't get more bugs from this, maybe users are just generally unsure about what the browser does for a given reload shortcut and didn't think DevTools were to blame?

Note that we have a test for reload at https://searchfox.org/mozilla-central/source/devtools/client/framework/test/browser_toolbox_window_reload_target.js. It checks the "forceReload" shortcuts but it only checks the page is reloaded, and doesn't check if the LOAD_FLAGS_BYPASS_CACHE flag was passed. I didn't see any easy way to modify the test to do that, which is why I file this as a followup.

If we can't find a way to check the reload flags, we just need to test a scenario where a forceReload will have a visible impact (eg netmonitor without the "disable cache" option).

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

This is a test for the bug fix that landed in https://bugzilla.mozilla.org/show_bug.cgi?id=1671959

A new test is added, forked from devtools/client/framework/test/browser_toolbox_window_reload_target.js
Most of the testReload helper from the original test is moved to the head.js of the folder.

The new test relies on a simple sjs file which simply prints the value of the cache-control header.

Blocks: 1672104
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be30ef2e6513
[devtools] Add a test to check that DevTools forceReload bypasses the cache r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: