Bug 88239 - Move setAutofilled from LayoutTestController to window.internals()
Summary: Move setAutofilled from LayoutTestController to window.internals()
Status: RESOLVED DUPLICATE of bug 110521
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jesus Sanchez-Palencia
URL:
Keywords:
Depends on:
Blocks: 87284
  Show dependency treegraph
 
Reported: 2012-06-04 10:04 PDT by Jesus Sanchez-Palencia
Modified: 2017-12-14 12:30 PST (History)
13 users (show)

See Also:


Attachments
WIP patch for ews testing (24.08 KB, patch)
2012-06-04 14:33 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (30.75 KB, patch)
2012-06-05 07:34 PDT, Jesus Sanchez-Palencia
eric: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Sanchez-Palencia 2012-06-04 10:04:53 PDT
Implement setAutofilled in window.internals, avoiding duplicated code in WebKitTestRunner and DumpRenderTree. This will also unskip tests for WKTR.
Comment 1 Jesus Sanchez-Palencia 2012-06-04 14:33:08 PDT
Created attachment 145628 [details]
WIP patch for ews testing
Comment 2 WebKit Review Bot 2012-06-04 14:35:17 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 James Robinson 2012-06-04 14:41:04 PDT
Comment on attachment 145628 [details]
WIP patch for ews testing

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

Moving the test hook to window.internals seems like a good thing, but Chromium at least will need to continue exposing this functionality via public API.  I expect this to be true for other ports as well.

> Source/WebKit/chromium/public/WebInputElement.h:92
> +        // FIXME: This can be removed if there are no Chromium-internal calls to it.
> +        // See http://webkit.org/b/88239.
>          WEBKIT_EXPORT void setAutofilled(bool);

This is incorrect - we call setAutofilled() via the public API and we will continue doing so.  It's a generally useful thing to know about for any embedder who implements autofill to set.

Also, some spurious newlines here.  Please remove before landing.
Comment 4 Build Bot 2012-06-04 15:08:40 PDT
Comment on attachment 145628 [details]
WIP patch for ews testing

Attachment 145628 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12906089
Comment 5 Alexey Proskuryakov 2012-06-04 15:52:00 PDT
Comment on attachment 145628 [details]
WIP patch for ews testing

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

> Source/WebKit/mac/DOM/WebDOMOperationsPrivate.h:44
> +// FIXME: This can be removed if there are no Apple-internal calls to it.
> +// See http://webkit.org/b/88239.
>  - (void)_setAutofilled:(BOOL)autofilled;

This is in use, and can not be removed. I'd like the API layer to continue being tested, too.
Comment 6 Jesus Sanchez-Palencia 2012-06-05 06:08:02 PDT
(In reply to comment #3)
Hi!

> (From update of attachment 145628 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=145628&action=review
> 
> Moving the test hook to window.internals seems like a good thing, but Chromium at least will need to continue exposing this functionality via public API.  I expect this to be true for other ports as well.

I'm not removing any private nor public APIs from any port, so I guess we are fine about this. I will remove the FIXMEs now that I know that these functions are actually used.

> 
> > Source/WebKit/chromium/public/WebInputElement.h:92
> > +        // FIXME: This can be removed if there are no Chromium-internal calls to it.
> > +        // See http://webkit.org/b/88239.
> >          WEBKIT_EXPORT void setAutofilled(bool);
> 
> This is incorrect - we call setAutofilled() via the public API and we will continue doing so.  It's a generally useful thing to know about for any embedder who implements autofill to set.
> 
> Also, some spurious newlines here.  Please remove before landing.

Will do, thanks!
Comment 7 Jesus Sanchez-Palencia 2012-06-05 06:13:58 PDT
(In reply to comment #5)
Hi!

> (From update of attachment 145628 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=145628&action=review
> 
> > Source/WebKit/mac/DOM/WebDOMOperationsPrivate.h:44
> > +// FIXME: This can be removed if there are no Apple-internal calls to it.
> > +// See http://webkit.org/b/88239.
> >  - (void)_setAutofilled:(BOOL)autofilled;
> 
> This is in use, and can not be removed. I'd like the API layer to continue being tested, too.

I will remove the FIXMEs here as well, thanks.
I don't really get why using DRT to test public API seems reasonable, but of course no API layer should be left untested. I can see that most of these "move from LTC to window.internals" will be blocked by this issue, so the way here will be writing API tests for Mac and Win?
Comment 8 Jesus Sanchez-Palencia 2012-06-05 07:34:52 PDT
Created attachment 145790 [details]
Patch
Comment 9 Eric Seidel (no email) 2012-06-20 07:30:03 PDT
Comment on attachment 145790 [details]
Patch

LGTM.  I look forward to more awesome patches like this!
Comment 10 WebKit Review Bot 2012-06-20 07:34:46 PDT
Comment on attachment 145790 [details]
Patch

Rejecting attachment 145790 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
g file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/fast/forms/input-autofilled.html
patching file LayoutTests/fast/forms/reset-autofilled.html
patching file LayoutTests/platform/wk2/Skipped
Hunk #1 succeeded at 1001 (offset 2 lines).
patching file ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Eric Seidel']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13003205
Comment 11 James Robinson 2012-06-20 09:37:17 PDT
I thought the consensus was not to move this one since it's testing important WebKit API on multiple ports.
Comment 12 Jesus Sanchez-Palencia 2012-06-22 05:25:02 PDT
(In reply to comment #9)
> (From update of attachment 145790 [details])
> LGTM.  I look forward to more awesome patches like this!
:D
Thanks for the review and feedback!


(In reply to comment #11)
> I thought the consensus was not to move this one since it's testing important WebKit API on multiple ports.

I'm not that sure we've ever reached a consensus here, but I'm looking forward to it.


Patch-wise, I will fix it on Monday because I was/am out of the office this week.
Comment 13 Daniel Bates 2017-12-14 12:30:29 PST

*** This bug has been marked as a duplicate of bug 110521 ***