mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 795262. Highlighter test should not depend on MozAfterPaint firing for changes to invisible elements. Also, poll for the value to change instead of assuming a constant 1000ms timeout. r=dao,cjones
This commit is contained in:
parent
4af0a9996d
commit
3ced0b7534
@ -7,7 +7,7 @@ let div;
|
||||
function createDocument()
|
||||
{
|
||||
div = doc.createElement("div");
|
||||
div.setAttribute("style", "width: 100px; height: 100px;");
|
||||
div.setAttribute("style", "width: 100px; height: 100px; background:yellow;");
|
||||
doc.body.appendChild(div);
|
||||
|
||||
Services.obs.addObserver(runTest,
|
||||
@ -27,12 +27,17 @@ function runTest(subject)
|
||||
is(outline.style.width, "100px", "selection has the right width");
|
||||
|
||||
div.style.width = "200px";
|
||||
setTimeout(function () {
|
||||
function pollTest() {
|
||||
if (outline.style.width == "100px") {
|
||||
setTimeout(pollTest, 10);
|
||||
return;
|
||||
}
|
||||
is(outline.style.width, "200px", "selection updated");
|
||||
InspectorUI.closeInspectorUI();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}, 1000);
|
||||
}
|
||||
setTimeout(pollTest, 10);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user