Bug 1728442 - P1: Make browser description test rely on name/desc change events. r=Jamie

By using a real image, and not a broken one, we avoid the recreation
that happens when the image gains and loses an alt. We can then rely on
name/description changes.

This is a more accurate test that doesn't rely on tree mutations.

Differential Revision: https://phabricator.services.mozilla.com/D124233
This commit is contained in:
Eitan Isaacson 2021-09-02 18:06:51 +00:00
Родитель 8a71787216
Коммит 73f172d0c6
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -43,7 +43,7 @@ const tests = [
value: "aria description",
},
],
waitFor: [[EVENT_REORDER, matchContentDoc]],
waitFor: [[EVENT_NAME_CHANGE, "image"]],
expected: "",
},
{
@ -72,7 +72,7 @@ const tests = [
value: "title",
},
],
waitFor: [[EVENT_REORDER, matchContentDoc]],
waitFor: [[EVENT_NAME_CHANGE, "image"]],
expected: "another description",
},
{
@ -108,7 +108,7 @@ const tests = [
value: "aria description",
},
],
waitFor: [[EVENT_REORDER, matchContentDoc]],
waitFor: [[EVENT_NAME_CHANGE, "image"]],
expected: "another description",
},
{
@ -186,7 +186,7 @@ addAccessibleTask(
`
<p id="description">aria description</p>
<p id="description2">another description</p>
<img id="image" />`,
<img id="image" src="http://example.com/a11y/accessible/tests/mochitest/moz.png" />`,
async function(browser, accDoc) {
let imgAcc = findAccessibleChildByID(accDoc, "image");