Test unload handler in the initial empty document.
The patch [1] might introduce the kInitialDocument state to the RenderFrameHost. During code review, I was surprised not seeing the transition: kInitialDocument -> kRunningUnloadHandler. In theory, executing an unload handler from the initial empty document can happen. This patch adds a test showing it is possible. This turns out not to be crashing against [1]. The reason: the initial "fake" navigation for empty document IPC is received in between the creation and the deletion of the frame. This makes the RFH state to transition to kActive, just in time before the deletion. Even if this patch didn't prove its point, it it still a good addition. This might become more useful after the removal of the "fake" initial navigation (see [2]). R:acolwell@chromium.org CC:alexmos@chromium.org, rakina@chromium.org, sreeja@chromium.org [1]: https://chromium-review.googlesource.com/c/chromium/src/+/2430976/5 [2]: https://docs.google.com/document/d/1UjdxiDJ3sgVDbp0CZpsSntdwAYNMSfc2qajX4nzXfLY Bug: 1113357 Change-Id: Iaf146c77b767b3af37401dab968fb536efba5293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2449474 Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by:Aaron Colwell <acolwell@chromium.org> Reviewed-by:
Nasko Oskov <nasko@chromium.org> Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#814582}
Showing
Please register or sign in to comment