Looks like child windows indeed get detached, but rest don't. Note that both OmHistory and XHR tests are currently todo on Wine because they use outer window, and that also gets detached. I guess we will indeed need to keep refs from inner windows to outer windows after all, but I'll leave that aside for a follow-up MR, so for now they're todo_wine.