Bug 1543575 - add fission coverage for accessibility b-c e10s caching tests. r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D48551

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Yura Zenevich 2019-10-17 15:15:09 +00:00
Родитель f8c46981a4
Коммит 5ee679c147
7 изменённых файлов: 42 добавлений и 25 удалений

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

@ -14,12 +14,14 @@ support-files =
# Caching tests
[browser_caching_attributes.js]
skip-if = fission # Bug 1556627
[browser_caching_description.js]
[browser_caching_name.js]
skip-if = (os == "linux" && bits == 64) || (debug && os == "mac") || (debug && os == "win") #Bug 1388256
[browser_caching_relations.js]
[browser_caching_states.js]
[browser_caching_value.js]
skip-if = fission # Bug 1556627
[browser_contentSelectDropdown.js]

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

@ -129,5 +129,6 @@ addAccessibleTask(
testAttrs(textbox, expected);
testAbsentAttrs(textbox, unexpected);
}
}
},
{ iframe: true }
);

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

@ -43,7 +43,7 @@ const tests = [
value: "aria description",
},
],
waitFor: [[EVENT_REORDER, "body"]],
waitFor: [[EVENT_REORDER, matchContentDoc]],
expected: "",
},
{
@ -72,7 +72,7 @@ const tests = [
value: "title",
},
],
waitFor: [[EVENT_REORDER, "body"]],
waitFor: [[EVENT_REORDER, matchContentDoc]],
expected: "another description",
},
{
@ -108,7 +108,7 @@ const tests = [
value: "aria description",
},
],
waitFor: [[EVENT_REORDER, "body"]],
waitFor: [[EVENT_REORDER, matchContentDoc]],
expected: "another description",
},
{
@ -209,5 +209,6 @@ addAccessibleTask(
}
testDescr(imgAcc, expected);
}
}
},
{ iframe: true }
);

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

@ -514,20 +514,24 @@ async function testNameRule(browser, target, ruleset, expected) {
}
markupTests.forEach(({ id, ruleset, markup, expected }) =>
addAccessibleTask(markup, async function(browser, accDoc) {
const observer = {
observe(subject, topic, data) {
const event = subject.QueryInterface(nsIAccessibleEvent);
console.log(eventToString(event));
},
};
Services.obs.addObserver(observer, "accessible-event");
// Find a target accessible from an accessible subtree.
let acc = findAccessibleChildByID(accDoc, id);
// Find target's parent accessible from an accessible subtree.
let parent = getAccessibleDOMNodeID(acc.parent);
let target = { id, parent, acc };
await testNameRule(browser, target, rules[ruleset], expected);
Services.obs.removeObserver(observer, "accessible-event");
})
addAccessibleTask(
markup,
async function(browser, accDoc) {
const observer = {
observe(subject, topic, data) {
const event = subject.QueryInterface(nsIAccessibleEvent);
console.log(eventToString(event));
},
};
Services.obs.addObserver(observer, "accessible-event");
// Find a target accessible from an accessible subtree.
let acc = findAccessibleChildByID(accDoc, id);
// Find target's parent accessible from an accessible subtree.
let parent = getAccessibleDOMNodeID(acc.parent);
let target = { id, parent, acc };
await testNameRule(browser, target, rules[ruleset], expected);
Services.obs.removeObserver(observer, "accessible-event");
},
{ iframe: true }
)
);

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

@ -91,5 +91,6 @@ addAccessibleTask(
for (let spec of attrRelationsSpec) {
await testRelated(browser, accDoc, ...spec);
}
}
},
{ iframe: true }
);

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

@ -149,5 +149,6 @@ addAccessibleTask(
await runStateTests(browser, accDoc, "checkbox", attributeTests);
await runStateTests(browser, accDoc, "file", ariaTests);
await runStateTests(browser, accDoc, "text", extraStateTests);
}
},
{ iframe: true }
);

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

@ -29,7 +29,13 @@ const valueTests = [
id: "select",
async action(browser) {
await invokeFocus(browser, "select");
await BrowserTestUtils.synthesizeKey("3", {}, browser);
await invokeContentTask(browser, [], () => {
const { ContentTaskUtils } = ChromeUtils.import(
"resource://testing-common/ContentTaskUtils.jsm"
);
const EventUtils = ContentTaskUtils.getEventUtils(content);
EventUtils.synthesizeKey("3", {}, content);
});
},
waitFor: EVENT_TEXT_VALUE_CHANGE,
expected: "3rd",
@ -178,5 +184,6 @@ addAccessibleTask(
is(acc.value, expected, `Correct value for ${prettyName(acc)}`);
}
}
}
},
{ iframe: true }
);