зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1435048 - Wait for async UI update; r=ochameau
MozReview-Commit-ID: Co3WyAIzOLg --HG-- extra : rebase_source : f162c0bce3bb0fe92bd3044036b7888bed799887
This commit is contained in:
Родитель
e24fc9efb3
Коммит
d433394917
|
@ -34,11 +34,19 @@ add_task(async () => {
|
|||
ok(onContentLoad, "There must be DOMContentLoaded label");
|
||||
ok(onLoad, "There must be load label");
|
||||
|
||||
// The content should not be empty
|
||||
ok(requestCount.textContent, "There must be request count label text");
|
||||
ok(size.textContent, "There must be size label text");
|
||||
ok(onContentLoad.textContent, "There must be DOMContentLoaded label text");
|
||||
ok(onLoad.textContent, "There must be load label text");
|
||||
// The content should not be empty. The UI update can also be async,
|
||||
// so use waitUntil.
|
||||
await waitUntil(() => requestCount.textContent);
|
||||
ok(true, "There must be request count label text");
|
||||
|
||||
await waitUntil(() => size.textContent);
|
||||
ok(true, "There must be size label text");
|
||||
|
||||
await waitUntil(() => onContentLoad.textContent);
|
||||
ok(true, "There must be DOMContentLoaded label text");
|
||||
|
||||
await waitUntil(() => onLoad.textContent);
|
||||
ok(true, "There must be load label text");
|
||||
|
||||
return teardown(monitor);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче