Skip to content

Commit

Permalink
Bug 1820749 - [devtool] Update compatibility data r=devtools-reviewer…
Browse files Browse the repository at this point in the history
…s,nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D171850
  • Loading branch information
bomsy committed Mar 10, 2023
1 parent 2a7dbb5 commit 6e07a87
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const {

// Test the behavior rules are dynamically added

const ISSUE_BINDING = {
const ISSUE_OUTLINE_RADIUS = {
type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY,
property: "-moz-binding",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding",
property: "-moz-outline-radius",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius",
deprecated: true,
experimental: false,
};
Expand All @@ -33,7 +33,7 @@ const ISSUE_HYPHENS = {
const TEST_URI = `
<style>
.issue {
-moz-binding: none;
-moz-outline-radius: 25px;
}
</style>
<body>
Expand Down Expand Up @@ -82,8 +82,8 @@ add_task(async function() {
inspector,
selectedElementPane,
allElementsPane,
[ISSUE_HYPHENS, ISSUE_BINDING],
[ISSUE_HYPHENS, ISSUE_BINDING],
[ISSUE_HYPHENS, ISSUE_OUTLINE_RADIUS],
[ISSUE_HYPHENS, ISSUE_OUTLINE_RADIUS],
async function() {
content.document.querySelector(".test").classList.add("issue");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const {

// Test the behavior rules are dynamically added

const ISSUE_BINDING = {
const ISSUE_OUTLINE_RADIUS = {
type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY,
property: "-moz-binding",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding",
property: "-moz-outline-radius",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius",
deprecated: true,
experimental: false,
};
Expand All @@ -34,7 +34,7 @@ const ISSUE_HYPHENS = {
const TEST_URI = `
<style>
.child {
-moz-binding: none;
-moz-outline-radius: 25px;
}
</style>
<body></body>
Expand Down Expand Up @@ -64,8 +64,8 @@ add_task(async function() {
inspector,
selectedElementPane,
allElementsPane,
[ISSUE_BINDING],
[ISSUE_HYPHENS, ISSUE_BINDING],
[ISSUE_OUTLINE_RADIUS],
[ISSUE_HYPHENS, ISSUE_OUTLINE_RADIUS],
async function() {
const doc = content.document;
const parent = doc.querySelector("body");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const {

// Test the behavior rules are dynamically added

const ISSUE_BINDING = {
const ISSUE_OUTLINE_RADIUS = {
type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY,
property: "-moz-binding",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding",
property: "-moz-outline-radius",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius",
deprecated: true,
experimental: false,
};
Expand All @@ -34,7 +34,7 @@ const ISSUE_HYPHENS = {
const TEST_URI = `
<style>
div {
-moz-binding: none;
-moz-outline-radius: 25px;
}
</style>
<body>
Expand All @@ -54,16 +54,20 @@ add_task(async function() {
const { allElementsPane, inspector } = await openCompatibilityView();

info("Check initial issues");
await assertIssueList(allElementsPane, [ISSUE_BINDING, ISSUE_HYPHENS]);
await assertIssueList(allElementsPane, [ISSUE_OUTLINE_RADIUS, ISSUE_HYPHENS]);

info("Delete node whose child node has CSS compatibility issue");
await testNodeRemoval(".parent", inspector, allElementsPane, [ISSUE_BINDING]);
await testNodeRemoval(".parent", inspector, allElementsPane, [
ISSUE_OUTLINE_RADIUS,
]);

info("Delete node that has CSS compatibility issue");
await testNodeRemoval("div", inspector, allElementsPane, []);

info("Add node that has CSS compatibility issue");
await testNodeAddition("div", inspector, allElementsPane, [ISSUE_BINDING]);
await testNodeAddition("div", inspector, allElementsPane, [
ISSUE_OUTLINE_RADIUS,
]);

await removeTab(tab);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const {

// Test the behavior rules are dynamically added

const ISSUE_BINDING = {
const ISSUE_OUTLINE_RADIUS = {
type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY,
property: "-moz-binding",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding",
property: "-moz-outline-radius",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius",
deprecated: true,
experimental: false,
};
Expand All @@ -33,7 +33,7 @@ const ISSUE_HYPHENS = {
const TEST_URI = `
<style>
.issue {
-moz-binding: none;
-moz-outline-radius: 25px;
}
</style>
<body>
Expand Down Expand Up @@ -61,21 +61,25 @@ add_task(async function() {
await waitForCompatibilityListUpdate;

info("Check initial issues");
await checkPanelIssues(selectedElementPane, allElementsPane, [ISSUE_BINDING]);
await checkPanelIssues(selectedElementPane, allElementsPane, [
ISSUE_OUTLINE_RADIUS,
]);

await addNewRule(
"hyphens",
"none",
inspector,
selectedElementPane,
allElementsPane,
[ISSUE_BINDING, ISSUE_HYPHENS]
[ISSUE_OUTLINE_RADIUS, ISSUE_HYPHENS]
);

info("Toggle the inline issue rendering it disable");
await togglePropStatusOnRuleView(inspector, 0, 0);
info("Check the issues listed in panel");
await checkPanelIssues(selectedElementPane, allElementsPane, [ISSUE_BINDING]);
await checkPanelIssues(selectedElementPane, allElementsPane, [
ISSUE_OUTLINE_RADIUS,
]);

info("Toggle the class rule rendering it disabled");
await togglePropStatusOnRuleView(inspector, 1, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
const TEST_URI = `
<style>
body {
-moz-binding: none;
-moz-outline-radius: 25px;
}
div {
-moz-binding: none;
-moz-outline-radius: 25px;
}
</style>
<body><div></div></body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ const TEST_DATA = [
},
{
description: "Test for a property defined with prefix",
declarations: [{ name: "-moz-binding" }],
declarations: [{ name: "-moz-outline-radius" }],
browsers: [FIREFOX_1, FIREFOX_60, FIREFOX_69],
expectedIssues: [
{
type: COMPATIBILITY_ISSUE_TYPE.CSS_PROPERTY,
property: "-moz-binding",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding",
property: "-moz-outline-radius",
url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius",
deprecated: true,
experimental: false,
unsupportedBrowsers: [FIREFOX_69],
unsupportedBrowsers: [],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion devtools/shared/compatibility/dataset/css-properties.json

Large diffs are not rendered by default.

0 comments on commit 6e07a87

Please sign in to comment.