VOOZH about

URL: https://phabricator.services.mozilla.com/D143391

⇱ ⚙ D143391 Bug 1392125 - Fix MAX_SESSION_RESULTS is not defined. r?zombie


Bug 1392125 - Fix MAX_SESSION_RESULTS is not defined. r?zombie
AcceptedPublic

Authored by def00111 on Apr 11 2022, 5:59 PM.
Referenced Files
F72927026: D143391.1781798014.diff
Wed, Jun 17, 3:53 PM
F72860837: D143391.1781730891.diff
Tue, Jun 16, 9:14 PM
F72860836: D143391.1781730890.diff
Tue, Jun 16, 9:14 PM
Unknown Object (File)
Tue, Jun 16, 3:56 PM
Unknown Object (File)
Fri, Jun 5, 10:28 AM
Unknown Object (File)
Thu, Jun 4, 10:13 PM
Unknown Object (File)
Thu, Jun 4, 7:14 PM
Unknown Object (File)
Thu, Jun 4, 5:16 PM

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
Comment Actions

Code analysis found 1 defect in the diff 566234:

  • 1 defect found by code coverage analysis

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:
Should they have tests, or are they dead code?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.

You can view these defects on the code-review frontend and on Treeherder.

Comment Actions

Code analysis found 1 defect in the diff 566647:

  • 1 defect found by code coverage analysis

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:
Should they have tests, or are they dead code?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.

You can view these defects on the code-review frontend and on Treeherder.

Comment Actions

Code analysis found 1 defect in the diff 566725:

  • 1 defect found by code coverage analysis

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:
Should they have tests, or are they dead code?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.

You can view these defects on the code-review frontend and on Treeherder.

Comment Actions

Can you review the patch?

Comment Actions

This patch changes the behavior observable to extensions. Previously they could see whatever limit was available, but with this patch it's capped at 25.
For this reason, let's land this patch next week (after the version bump).

browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_max_results.js
15

Remove the message, it's not checked anywhere since you're calling without any parameters.

28

Add another test where this value is set to a lower value than 25, and repeat the test. If the relation between this pref and the API behavior is exactly as you described, then the test will ensure that this relation is tested & verified, instead of just being a comment that can become out-of-date.

Let's also add a unit test that confirms the value of the constant has the expected number. Currently, while the default is the same as the pref, it is still possible for MAX_SESSION_RESULTS to be out-of-sync with the actual maximum, which could result in surprising test results.

robwu requested changes to this revision.May 26 2022, 12:01 PM
This revision now requires changes to proceed.May 26 2022, 12:01 PM
Comment Actions

This patch changes the behavior observable to extensions. Previously they could see whatever limit was available, but with this patch it's capped at 25.
For this reason, let's land this patch next week (after the version bump).

I created https://bugzilla.mozilla.org/show_bug.cgi?id=1764376.

def00111 updated this revision to Diff 585854.
This revision is now accepted and ready to land.Jul 11 2022, 3:50 PM
This revision is now accepted and ready to land.Jul 11 2022, 5:24 PM

Revision Contents

PathSizeCoverage (All)Coverage (Touched)
browser/
components/
extensions/
parent/
7 lines98%
Loading...
test/
browser/
1 line--
95 lines--
CommitParentsAuthorSummaryDate
8d3cd97887d1kernp25
Bug 1392125 - Fix MAX_SESSION_RESULTS is not defined. r=robwu (Show More…)

Diff 600487

browser/components/extensions/parent/ext-sessions.js

Loading...

browser/components/extensions/test/browser/browser.ini

Loading...

browser/components/extensions/test/browser/browser_ext_sessions_getRecentlyClosed_max_results.js

Loading...