mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 00:42:54 +00:00
"apply the history step" initiated by reloading or back/forward navigation might require doing fetching while populating a document, so it is not possible to restrict spin_until() to process only NavigationAndTraversal task source. "apply the history step" initiated by synchronous navigation keeps processing only NavigationAndTraversal task source because it will never have to populate a document. Another reason to keep synchronous navigation blocking other task sources is that we crash if active SHE changes in the middle of "apply the history step" initiated by sync navigation. The new test is added to makes sure we don't regress that.
22 lines
640 B
HTML
22 lines
640 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest(done => {
|
|
let counter = 0;
|
|
setTimeout(() => {
|
|
history.replaceState({}, "test", "history-replace-push-state-race-3.html");
|
|
counter++;
|
|
if (counter === 2) {
|
|
println("test done!");
|
|
done();
|
|
}
|
|
}, 0);
|
|
setTimeout(() => {
|
|
history.replaceState({}, "test", "history-replace-push-state-race-3.html");
|
|
counter++;
|
|
if (counter === 2) {
|
|
println("test done!");
|
|
done();
|
|
}
|
|
}, 0);
|
|
});
|
|
</script>
|