Skip to content

Conversation

@ruhankiani
Copy link
Contributor

Relevant Links

Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1976547
TestRail: 134642

Description of Code / Doc Changes

  • Created a test to verify that tabs can be hard reloaded and override any cache by using the keyboard shortcuts (CTRL/CMD + SHIFT + "r").

Process Changes Required

Mark the relevant boxes:

  • Adds a dependency (rerun pipenv install)
  • Changes the BasePage
  • Changes or creates a BOM/POM (name the object model): _
  • Changes CI flow
  • Changes scheduled Beta or DevEdition
  • Changes Git hooks or Github settings
  • Changes L10n harness

Screenshots or Explanations

  1. We create a new browser and tab.
  2. We navigate to the 'https://postman-echo.com/headers' website which allows us to view the headers sent in the http request through html elements.
  3. Perform an action sequence to hold CTRL/CMD + SHIFT and press "r"
  4. Check the html elements to verify that the 'If-None-Match header' is not present and checks that both the 'pragma' and 'cache-control' headers contain "no-cache".
  5. This lets us know that the page will load without using cache.

Comments or Future Work

  • We may want to consider making a test to check whether BFC (back-forward-cache) is being used or not after a hard reload.
  • Since this test uses the website 'https://postman-echo.com/headers', we may have to consider in the future if the website is still active and working or not.
  • It would be better to be able to check cache use without having to rely on loading a specific website.

Workflow Checklist

  • Please request reviewers
  • If this is an unblocker, please post in Slack.
  • If asked to address comments, please resolve conversations.
  • If asked to change code, please re-request review from the person who wanted changes.

Thank you!

…cache) by using keyboard shortcuts (Bug 1976547)
Copy link
Collaborator

@Tracy-Walker Tracy-Walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the keyboard short in lines 30-40 to modules/browser_object_navigation.py. Yours will be similar in structure to the keyboard shortcut for toggle_bookmarks_toolbar_with_key_combo()

Other than that, looks good. Nicely done solving how to check for overriding the browser cache.

Copy link
Collaborator

@Tracy-Walker Tracy-Walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you, Ruhan.

@Tracy-Walker Tracy-Walker merged commit 855f981 into mozilla:main Sep 9, 2025
15 checks passed
@ruhankiani ruhankiani deleted the test/test_reload_overiding_cache_keys branch September 24, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants