Skip to content

Commit

Permalink
Make NavigateReaction private to NavigateEvent, attempt #2
Browse files Browse the repository at this point in the history
Most of the logic now lives on NaviagateEvent itself (in React()
and ReactDone()), which the new NavigateEvent::Reaction is a minimal
callback function wrapper.

Change-Id: Id31152b048fc7166a8ac45bda7e136a2143fd56f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4369772
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1123074}
  • Loading branch information
natechapin authored and chromium-wpt-export-bot committed Mar 28, 2023
1 parent 94aec98 commit 22357f0
Showing 1 changed file with 16 additions and 0 deletions.
@@ -0,0 +1,16 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="i" src="/common/blank.html"></iframe>
<script>
async_test(t => {
window.onload = t.step_func(() => {
i.contentWindow.onunload = t.step_func(() => {
i.contentWindow.history.replaceState(null, "", "#");
i.remove();
t.step_timeout(t.step_func_done(), 0);
});
i.contentWindow.location = "/common/blank.html?1";
});
}, "reacting to the navigate event doesn't crash when replaceState is called in onunload");
</script>

0 comments on commit 22357f0

Please sign in to comment.