Tweak crashtest to appease lint.
MANUAL PUSH: Orange fix CLOSED TREE
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1886506
gecko-commit: 71657ce5e467977121902bf9116030566ae6e35f
diff --git a/editing/crashtests/caret-display-list.html b/editing/crashtests/caret-display-list.html
index 9931326..f7c7a74 100644
--- a/editing/crashtests/caret-display-list.html
+++ b/editing/crashtests/caret-display-list.html
@@ -7,13 +7,18 @@
}
</style>
<script>
+let stop = false;
function func_01() {
document.execCommand("justifyCenter", false)
document.getSelection().collapse(a)
- setTimeout(func_01, 0)
- // Ensure that we've painted at least once.
requestAnimationFrame(() => requestAnimationFrame(() => {
- document.documentElement.classList = "";
+ if (stop) {
+ document.documentElement.classList = "";
+ return;
+ }
+ // Ensure that we've painted at least twice.
+ stop = true;
+ func_01();
}));
}
document.addEventListener("DOMContentLoaded", func_01)