Fix layout test to not rely on function ctor from detached frame

I'm planning to restrict this behavior, so I'm rewriting the test such
that it still tests what it's supposed to test.

BUG=541703
R=mkwst@chromium.org

Review-Url: https://codereview.chromium.org/2108503006
Cr-Commit-Position: refs/heads/master@{#403768}
1 file changed