Bug 56802 - Clear autofilled flag when reseting a form
Summary: Clear autofilled flag when reseting a form
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Ilya Sherman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-21 23:31 PDT by Ilya Sherman
Modified: 2011-03-22 06:44 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.93 KB, patch)
2011-03-21 23:35 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (5.12 KB, patch)
2011-03-21 23:41 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (5.22 KB, patch)
2011-03-22 00:48 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Sherman 2011-03-21 23:31:47 PDT
Clear autofilled flag when reseting a form
Comment 1 Ilya Sherman 2011-03-21 23:35:45 PDT
Created attachment 86426 [details]
Patch
Comment 2 Ilya Sherman 2011-03-21 23:41:28 PDT
Created attachment 86427 [details]
Patch
Comment 3 James Robinson 2011-03-21 23:53:59 PDT
Comment on attachment 86427 [details]
Patch

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

> LayoutTests/platform/chromium/fast/forms/reset-autofilled-expected.txt:5
> +This tests that a field's autofilled state is reverted when the form is reset. It can only be run using DumpRenderTree.
> +
> +PASS 1 is non-zero.
> +PASS 0 is 0
> +

why do we need this? this seems identical to the fallback expectation

> LayoutTests/platform/win/fast/forms/reset-autofilled-expected.txt:4
> +PASS 1 is non-zero.
> +FAIL 1 should be 0. Was 1.

why does this fail? is there a bug on file?
Comment 4 Ilya Sherman 2011-03-21 23:57:16 PDT
(In reply to comment #3)
> (From update of attachment 86427 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=86427&action=review
> 
> > LayoutTests/platform/chromium/fast/forms/reset-autofilled-expected.txt:5
> > +This tests that a field's autofilled state is reverted when the form is reset. It can only be run using DumpRenderTree.
> > +
> > +PASS 1 is non-zero.
> > +PASS 0 is 0
> > +
> 
> why do we need this? this seems identical to the fallback expectation

The fallback expectation -- at least for Windows and Linux -- is the Windows one, which is wrong in this case.

> > LayoutTests/platform/win/fast/forms/reset-autofilled-expected.txt:4
> > +PASS 1 is non-zero.
> > +FAIL 1 should be 0. Was 1.
> 
> why does this fail? is there a bug on file?

This fails because the relevant LayoutTestController method is not implemented: https://bugs.webkit.org/show_bug.cgi?id=55834
Comment 5 Kent Tamura 2011-03-22 00:33:42 PDT
Comment on attachment 86427 [details]
Patch

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

> LayoutTests/fast/forms/reset-autofilled.html:27
> +        shouldBe(stringify(countAutofilledElements()), '0');

Why stringify() is needed? 
shouldBe('countAutoFilledElements()', '0') doesn't work?

>>> LayoutTests/platform/win/fast/forms/reset-autofilled-expected.txt:4

>> 
>> why does this fail? is there a bug on file?
> 
> This fails because the relevant LayoutTestController method is not implemented: https://bugs.webkit.org/show_bug.cgi?id=55834

Could you implement it for Windows?
Comment 6 Ilya Sherman 2011-03-22 00:48:09 PDT
Created attachment 86436 [details]
Patch
Comment 7 Ilya Sherman 2011-03-22 00:51:18 PDT
(In reply to comment #5)
> Why stringify() is needed? 
> shouldBe('countAutoFilledElements()', '0') doesn't work?

Good point -- fixed.


> >>> LayoutTests/platform/win/fast/forms/reset-autofilled-expected.txt:4
> >> 
> >> why does this fail? is there a bug on file?
> > 
> > This fails because the relevant LayoutTestController method is not implemented: https://bugs.webkit.org/show_bug.cgi?id=55834
> 
> Could you implement it for Windows?

I'd like to, but I need to track down someone who can point me in the right direction.
Comment 8 WebKit Commit Bot 2011-03-22 02:49:03 PDT
Comment on attachment 86436 [details]
Patch

Clearing flags on attachment: 86436

Committed r81652: <http://trac.webkit.org/changeset/81652>
Comment 9 WebKit Commit Bot 2011-03-22 02:49:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 WebKit Review Bot 2011-03-22 05:20:25 PDT
http://trac.webkit.org/changeset/81652 might have broken SnowLeopard Intel Release (WebKit2 Tests)
Comment 11 Adam Roben (:aroben) 2011-03-22 06:00:58 PDT
(In reply to comment #10)
> http://trac.webkit.org/changeset/81652 might have broken SnowLeopard Intel Release (WebKit2 Tests)

The test relies on LayoutTestController functionality that's unimplemented in WebKitTestRunner. I'll add it to the mac-wk2 Skipped file.
Comment 12 Adam Roben (:aroben) 2011-03-22 06:44:58 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 86427 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=86427&action=review
> > > LayoutTests/platform/win/fast/forms/reset-autofilled-expected.txt:4
> > > +PASS 1 is non-zero.
> > > +FAIL 1 should be 0. Was 1.
> > 
> > why does this fail? is there a bug on file?
> 
> This fails because the relevant LayoutTestController method is not implemented: https://bugs.webkit.org/show_bug.cgi?id=55834

Bug 55834 is about layoutTestController.setValueForUser. We had no bug about layoutTestController.setAutofilled, so I filed one: bug 56828.

It turns out the Windows results are incorrect. I'll update them to match reality.