Closed Bug 1655200 Opened 5 years ago Closed 5 years ago

checks for values in browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js are broken or duplicated

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jmaher, Assigned: ablayelyfondou)

References

Details

Attachments

(1 file)

In bug 1647187, we are working to change is() to be object.is(). This means changing a lot of tests. We have fixed almost all the tests and one of the last tests to get fixed is:
browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js

the problem is in head.js:
https://searchfox.org/mozilla-central/source/browser/base/content/test/tabs/head.js#180

we get into:

      if (expectMuted || everMutedTabs.has(tab)) {
        everMutedTabs.add(tab);
        is(tab.muteReason, null, "The tab should have a null muteReason value");
      } else {
        is(
          tab.muteReason,
          undefined,
          "The tab should have an undefined muteReason value"
        );
      }

and we end up in the else condition with tab.muteReason=null and not undefined.

Typically I would change the value, but this test specifically checks for null AND undefined, so I need someone who understands this to look into it.

Abdoulaye this was added in bug 1470677, do you know if we should have both a check for null and undefined? Maybe you have more background

Flags: needinfo?(ablayelyfondou)

Yes, we should have both checks. I will have a look a this.

Flags: needinfo?(ablayelyfondou)

thanks, if you look at Object.is() or === instead of is() which uses ==, that will show the error.

Assignee: nobody → ablayelyfondou

@jmaher: We need to find a reviewer for this. Maybe @dao can help?

Flags: needinfo?(jmaher)
Flags: needinfo?(dao+bmo)

thanks for fixing this so fast.

I wouldn't know who to review, :jaws will be back next week if :dao doesn't have a recommendation.

Flags: needinfo?(jmaher)

I r+'d the patch.

Flags: needinfo?(dao+bmo)

(In reply to Dão Gottwald [::dao] from comment #7)

I r+'d the patch.

Thank you!

Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ea9fc3e7a58 Make sure that every muted tab in browser_multiselect_tabs_mute_unmute.js file is added to the set of muted tabs. r=dao
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: