Bug 157509 - Web Automation: add command to asynchronously load the Web Inspector frontend in the background
Summary: Web Automation: add command to asynchronously load the Web Inspector frontend...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Brian Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-09 23:52 PDT by Brian Burg
Modified: 2016-05-11 13:56 PDT (History)
7 users (show)

See Also:


Attachments
Proposed Fix (13.76 KB, patch)
2016-05-10 00:06 PDT, Brian Burg
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2016-05-09 23:52:19 PDT
In case you want to use `debugger;` or hit a breakpoint whilst running other actions.
Comment 1 Radar WebKit Bug Importer 2016-05-09 23:52:44 PDT
<rdar://problem/26190121>
Comment 2 Brian Burg 2016-05-10 00:06:50 PDT
Created attachment 278481 [details]
Proposed Fix
Comment 3 Timothy Hatcher 2016-05-10 10:00:32 PDT
Comment on attachment 278481 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=278481&action=review

> Source/WebKit2/ChangeLog:36
> +        * WebProcess/Automation/WebAutomationSessionProxy.js:
> +        (let.AutomationSessionProxy.prototype.evaluateJavaScriptFunction):
> +        Rename clearTimeout to window.clearTimeout to be less ambiguous.

I'm not sure why this is needed. We hardly ever prefix the timeout functions.

> Source/WebKit2/UIProcess/Automation/Automation.json:303
> +            },

Stray?
Comment 4 Joseph Pecoraro 2016-05-10 12:26:48 PDT
Comment on attachment 278481 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=278481&action=review

> Source/WebKit2/UIProcess/Automation/Automation.json:298
> +            "description": "Inspect the specified browsing context using the Web Inspector.",

We normally drop 'this' in the phrase "the Web Inspector". You wouldn't say "the Xcode" or "the Safari".

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:448
> +    page->inspector()->connect();

Most code that uses page->inspector() includes a nullptr check. We should do that here as well. If the WebPage is closed / invalid then inspector() would be nullptr. Unless there is some other way that this would be avoided.
Comment 5 Joseph Pecoraro 2016-05-10 12:27:17 PDT
> We normally drop 'this'

Err, 'the'
Comment 6 Brian Burg 2016-05-11 13:56:29 PDT
Committed r200702: <http://trac.webkit.org/changeset/200702>