Closed Bug 1756533 Opened 3 years ago Closed 3 years ago

devtools.inspector.compatibility.target-browsers should only holds id and status of selected browsers

Categories

(DevTools :: Inspector: Compatibility, task)

task

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

At the moment, what we put in devtools.inspector.compatibility.target-browsers is an array of object containing all the information of a browser: id, name, version, status (e.g. firefox, Firefox, 97, current).

But the compatibility panel only needs (and uses) the id and the status (e.g. firefox, current).

Storing the additional data is wasteful, but also confusing when looking at getTargetBrowsers as one could think we only retrieve the browser list from the pref, not from the json data file (or RemoteSettings once Bug 1754946 lands)

We only need to store the id and status of the selected browsers
for the inspector.
Functions from compatibility-user-settings are renamed to better
convey what they are actually doing, and JSDoc is added to make
everything more explicit.

Depends on D139392

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/47550f255778 [devtools] Only store what's needed in devtools.inspector.compatibility.target-browsers. r=jdescottes.

Backed out along with Bug 1756620 for causing failures on browser_rules_css-compatibility-check-add-fix.js

[task 2022-02-25T15:57:50.873Z] 15:57:50     INFO - TEST-PASS | devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js | "background-color:black" has expected message ID - 
[task 2022-02-25T15:57:50.874Z] 15:57:50     INFO - Buffered messages finished
[task 2022-02-25T15:57:50.877Z] 15:57:50     INFO - TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js | "user-select:none" has the correct compatibility status in the payload - Got false, expected true
[task 2022-02-25T15:57:50.877Z] 15:57:50     INFO - Stack trace:
[task 2022-02-25T15:57:50.879Z] 15:57:50     INFO - chrome://mochikit/content/browser-test.js:test_is:1422
[task 2022-02-25T15:57:50.880Z] 15:57:50     INFO - chrome://mochitests/content/browser/devtools/client/inspector/rules/test/head.js:checkDeclarationCompatibility:867
[task 2022-02-25T15:57:50.881Z] 15:57:50     INFO - chrome://mochitests/content/browser/devtools/client/inspector/rules/test/head.js:runCSSCompatibilityTests:1046
[task 2022-02-25T15:57:50.882Z] 15:57:50     INFO - chrome://mochitests/content/browser/devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js:null:115
[task 2022-02-25T15:57:50.883Z] 15:57:50     INFO - chrome://mochikit/content/browser-test.js:handleTask:989
[task 2022-02-25T15:57:50.884Z] 15:57:50     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1061
[task 2022-02-25T15:57:50.885Z] 15:57:50     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1189
[task 2022-02-25T15:57:50.886Z] 15:57:50     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:978
[task 2022-02-25T15:57:50.887Z] 15:57:50     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
[task 2022-02-25T15:57:50.888Z] 15:57:50     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-02-25T15:57:50.896Z] 15:57:50     INFO - TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js | "user-select:none" has expected message ID - Got undefined, expected "css-compatibility-default-message"
Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4984bcaf64cf [devtools] Only store what's needed in devtools.inspector.compatibility.target-browsers. r=jdescottes.
Regressions: 1757392

Backed out for causing failures on browser_rules_css-compatibility-check-add-fix.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/a4eb68270bfc14bd09c2476cf68c38b10c709780

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=4984bcaf64cf11f8a51184af6ab02bdfa8934785

Link to failure log: https://treeherder.mozilla.org/logviewer?job_id=369442562&repo=autoland&lineNumber=6290

Failure message : TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js | A promise chain failed to handle a rejection: Connection closed, pending request to server0.conn0.windowGlobal2147483651/compatibility37, type getCSSDeclarationBlockIssues failed

(In reply to Cristina Cozmuta (:CrissCozmuta) from comment #5)

Backed out for causing failures on browser_rules_css-compatibility-check-add-fix.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/a4eb68270bfc14bd09c2476cf68c38b10c709780

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=4984bcaf64cf11f8a51184af6ab02bdfa8934785

Link to failure log: https://treeherder.mozilla.org/logviewer?job_id=369442562&repo=autoland&lineNumber=6290

Failure message : TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_css-compatibility-check-add-fix.js | A promise chain failed to handle a rejection: Connection closed, pending request to server0.conn0.windowGlobal2147483651/compatibility37, type getCSSDeclarationBlockIssues failed

Looking into it

Flags: needinfo?(nchevobbe)

I was able to reproduce the failure locally and fix it. TRY is closed at the moment so I can't run a TV job, but I'm hopeful :)

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/770aacd27e89 [devtools] Only store what's needed in devtools.inspector.compatibility.target-browsers. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: