Speedometer removes and recreates its benchmark iframe while nested session-history bookkeeping is still queued. A live child-frame commit could find that its nested history list had been pruned and then behave like a stale detached frame. That dropped the real src navigation and left the harness waiting for a load event. Preserve the newest real child navigation until the initial session history entry is ready. Tolerate detached child navigables while history steps scan target entries, and recreate the missing nested history only when the child is still the container's live content navigable. Share the nested-history append path with initial child creation so the normal and recovery paths keep the same step handling. Add iframe remove/recreate coverage for pending child history, same-src load, and repeated pushState removal.
29 lines
874 B
HTML
29 lines
874 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
async function createFrameWithNestedHistory()
|
|
{
|
|
const iframe = document.createElement("iframe");
|
|
document.body.append(iframe);
|
|
|
|
iframe.contentWindow.history.pushState({}, "", "about:blank#child");
|
|
await internals.flushSessionHistoryTraversalQueue();
|
|
return iframe;
|
|
}
|
|
|
|
asyncTest(async done => {
|
|
history.pushState({}, "", "#parent");
|
|
await internals.flushSessionHistoryTraversalQueue();
|
|
|
|
const first = await createFrameWithNestedHistory();
|
|
first.remove();
|
|
await internals.flushSessionHistoryTraversalQueue();
|
|
|
|
const second = await createFrameWithNestedHistory();
|
|
second.remove();
|
|
await internals.flushSessionHistoryTraversalQueue();
|
|
|
|
println("PASS");
|
|
done();
|
|
});
|
|
</script>
|