Bug 165245 - Web Automation: expose navigator.webdriver if the page is controlled by automation
Summary: Web Automation: expose navigator.webdriver if the page is controlled by autom...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks: 165269
  Show dependency treegraph
 
Reported: 2016-11-30 23:40 PST by BJ Burg
Modified: 2016-12-01 13:39 PST (History)
7 users (show)

See Also:


Attachments
Proposed Fix (20.76 KB, patch)
2016-12-01 11:01 PST, BJ Burg
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-11-30 23:40:44 PST
Add open source implementation.
Comment 1 BJ Burg 2016-11-30 23:41:38 PST
<rdar://problem/29449874>
Comment 2 BJ Burg 2016-12-01 11:01:04 PST
Created attachment 295868 [details]
Proposed Fix

Needs to be landed manually with internal changes.
Comment 3 WebKit Commit Bot 2016-12-01 11:02:39 PST
Attachment 295868 [details] did not pass style-queue:


ERROR: Source/WebCore/Modules/webdriver/NavigatorWebDriver.h:43:  The parameter name "navigator" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Joseph Pecoraro 2016-12-01 13:16:59 PST
Comment on attachment 295868 [details]
Proposed Fix

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

I'm sure we could write a test for this!

> Source/WebCore/Modules/webdriver/NavigatorWebDriver.h:37
> +    NavigatorWebDriver(Frame*);

Nit: Could mark this as explicit. I'm not sure how strict we are with this keyword.
Comment 5 BJ Burg 2016-12-01 13:33:02 PST
Comment on attachment 295868 [details]
Proposed Fix

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

>> Source/WebCore/Modules/webdriver/NavigatorWebDriver.h:37
>> +    NavigatorWebDriver(Frame*);
> 
> Nit: Could mark this as explicit. I'm not sure how strict we are with this keyword.

OK
Comment 6 BJ Burg 2016-12-01 13:34:07 PST
(In reply to comment #4)
> Comment on attachment 295868 [details]
> Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=295868&action=review
> 
> I'm sure we could write a test for this!

We have an integration test for this in Safari's WebDriver test suite, IIRC. I'll file a followup bug.
Comment 7 BJ Burg 2016-12-01 13:39:42 PST
Committed r209198: <http://trac.webkit.org/changeset/209198>