зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1123948 - Wait for _applyingModifications to finish before checking computed style in livepreview test. r=pbrosset
This commit is contained in:
Родитель
a8e049ece0
Коммит
dc83310391
|
@ -37,7 +37,6 @@ add_task(function*() {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
function* testLivePreviewData(data, ruleView, selector) {
|
||||
let testElement = getNode(selector);
|
||||
let idRuleEditor = getRuleViewRuleEditor(ruleView, 1);
|
||||
|
@ -57,10 +56,13 @@ function* testLivePreviewData(data, ruleView, selector) {
|
|||
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||
}
|
||||
|
||||
// This wait is an orange waiting to happen, but it might take a few event
|
||||
// loop spins in either the client or parent process before we see the
|
||||
// updated value.
|
||||
yield wait(1);
|
||||
// Wait for the modifyproperties request to complete before
|
||||
// checking the computed style.
|
||||
for (let rule of ruleView._elementStyle.rules) {
|
||||
if (rule._applyingModifications) {
|
||||
yield rule._applyingModifications;
|
||||
}
|
||||
}
|
||||
|
||||
// While the editor is still focused in, the display should have changed already
|
||||
is((yield getComputedStyleProperty(selector, null, "display")),
|
||||
|
|
Загрузка…
Ссылка в новой задаче