Closed Bug 1555610 Opened 1 year ago Closed 1 year ago

Add the ability to test the what's new page

Categories

(Firefox :: General, enhancement, P2)

69 Branch
enhancement

Tracking

()

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Though it will be a tad hacky we should be able to provide a method to test the what's new page in a similar manner as enterprise policies are tested. To do this we could

  1. Use a pref for an alternate updates directory path that is only checked / read / used when Cu.isInAutomation is true in UpdateService.jsm.
  2. Add a pref to its browser.ini similar to
    app.update.altUpdateDirPath='<test-root>/browser/components/tests/browser/whats_new_page/'
  3. Create a static active-update.xml that is copied into the test directory as a support file.
  4. Add the test to its own directory so it doesn't interfere with other tests.

Since this involves code early in startup each test will need its own directory.

Version: 68 Branch → 69 Branch

Bugbug thinks this bug is a enhancement, but please change it back in case of error.

Type: defect → enhancement
Assignee: nobody → robert.strong.bugs
Status: NEW → ASSIGNED
Component: Application Update → General
Product: Toolkit → Firefox

Changes UpdateService.jsm so it is possible to have an alternate update directory for tests similar to how enterprise policies does it.
Removes BUG_COMPONENT in moz.build for browser_bug538331.js since that test is for BrowserContentHandler.jsm code.

Attachment #9068788 - Attachment is obsolete: true

Changes UpdateService.jsm so it is possible to have an alternate update directory for tests similar to how enterprise policies does it.
Removes BUG_COMPONENT in moz.build for browser_bug538331.js since that test is for BrowserContentHandler.jsm code.

Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2ec4ac648cf
Add whats new page test for code in BrowserContentHandler.jsm. r=bytesized,jaws
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69

For anyone following along, the test landed in this bug tests cases such as bug 1386224. There is a push to change the same code that caused bug 1386224 in order to improve perf which is why I was thinking about what could be done to test this, etc.

This test does not test cases where other code breaks the what's new page such as bug 1500114. It is now possible to write tests for cases such as bug 1500114 with the changes I landed in this bug though I suspect it would be very difficult to predict what else should be tested that would prevent another bug 1500114. Having said that, there might be some obvious areas that should be tested though I am not knowledgeable of any such areas.

Depends on: 1578834
You need to log in before you can comment on or make changes to this bug.