When I switched to use std::optional instead of empty strings for the browsing contexts in WebDriver, I forgot that automation uses empty string for frames to refer to the main frame. We should handle that case, because we are currently considering empty strings as valid browsing context. It's not a big deal because Automation converts back the empty string received to the main frame, though. We should also ensure we close the current browsing context when switching to a new top level browsing context.
Created attachment 315973 [details]
Comment on attachment 315973 [details]
Committed r219721: <http://trac.webkit.org/changeset/219721>