Bug 174668

Summary: WebDriver: correctly handle main frame handles
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 174670    
Attachments:
Description Flags
Patch bburg: review+

Description Carlos Garcia Campos 2017-07-19 23:58:12 PDT
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.
Comment 1 Carlos Garcia Campos 2017-07-20 00:01:16 PDT
Created attachment 315973 [details]
Patch
Comment 2 BJ Burg 2017-07-20 10:26:23 PDT
Comment on attachment 315973 [details]
Patch

r=me
Comment 3 Carlos Garcia Campos 2017-07-21 02:43:24 PDT
Committed r219721: <http://trac.webkit.org/changeset/219721>