зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1543575 - add fission coverage for accessibility b-c e10s caching tests. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D48551 --HG-- extra : rebase_source : 581fb8be517742e482dca807a10ed483b2ff78db extra : source : 8b92e98ee616c5a0e9d33d91d4bab5ea3209fe45
This commit is contained in:
Родитель
ede444df5b
Коммит
fcf58d51e6
|
@ -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 }
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче