зеркало из 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) {
|
function* testLivePreviewData(data, ruleView, selector) {
|
||||||
let testElement = getNode(selector);
|
let testElement = getNode(selector);
|
||||||
let idRuleEditor = getRuleViewRuleEditor(ruleView, 1);
|
let idRuleEditor = getRuleViewRuleEditor(ruleView, 1);
|
||||||
|
@ -57,10 +56,13 @@ function* testLivePreviewData(data, ruleView, selector) {
|
||||||
EventUtils.synthesizeKey("VK_RETURN", {});
|
EventUtils.synthesizeKey("VK_RETURN", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
// This wait is an orange waiting to happen, but it might take a few event
|
// Wait for the modifyproperties request to complete before
|
||||||
// loop spins in either the client or parent process before we see the
|
// checking the computed style.
|
||||||
// updated value.
|
for (let rule of ruleView._elementStyle.rules) {
|
||||||
yield wait(1);
|
if (rule._applyingModifications) {
|
||||||
|
yield rule._applyingModifications;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// While the editor is still focused in, the display should have changed already
|
// While the editor is still focused in, the display should have changed already
|
||||||
is((yield getComputedStyleProperty(selector, null, "display")),
|
is((yield getComputedStyleProperty(selector, null, "display")),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче