checks for values in browser/base/content/test/tabs/browser_multiselect_tabs_mute_unmute.js are broken or duplicated
Categories
(Firefox :: Tabbed Browser, enhancement)
Tracking
()
| 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.
| Reporter | ||
Comment 1•5 years ago
|
||
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
| Assignee | ||
Comment 2•5 years ago
|
||
Yes, we should have both checks. I will have a look a this.
| Reporter | ||
Comment 3•5 years ago
|
||
thanks, if you look at Object.is() or === instead of is() which uses ==, that will show the error.
| Assignee | ||
Comment 4•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 5•5 years ago
|
||
@jmaher: We need to find a reviewer for this. Maybe @dao can help?
| Reporter | ||
Comment 6•5 years ago
|
||
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.
| Assignee | ||
Comment 8•5 years ago
|
||
Comment 10•5 years ago
|
||
| bugherder | ||
Description
•