WebKit Bugzilla
Attachment 339854 Details for
Bug 185440
: Add tests to ensure that the Strong Password appearance is removed on form reset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Tests
bug-185440-20180508120300.patch (text/plain), 6.01 KB, created by
Daniel Bates
on 2018-05-08 12:04:12 PDT
(
hide
)
Description:
Tests
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-05-08 12:04:12 PDT
Size:
6.01 KB
patch
obsolete
>Subversion Revision: 231488 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a1dc03a143872fa1c31e3b528ce586faa1fe4abc..2503295464e1bf629056ee44db3eaab545c69896 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-08 Daniel Bates <dabates@apple.com> >+ >+ Add tests to ensure that the Strong Password appearance is removed on form reset >+ https://bugs.webkit.org/show_bug.cgi?id=185440 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm: >+ (-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]): >+ * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: >+ (TEST): >+ > 2018-05-08 Daniel Bates <dabates@apple.com> > > Resign Strong Password appearance when text field value changes >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm >index 67a025c2661ef424faff60a34bb79528942d87d0..a8f68e9b17c17389b44e00a7bce5b8df431f7d2e 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm >@@ -60,9 +60,11 @@ - (void)webProcessPlugIn:(WKWebProcessPlugInController *)plugInController didCre > WKBundlePageSetUIClient([browserContextController _bundlePageRef], &client.base); > > WKDOMDocument *document = [browserContextController mainFrameDocument]; >+ WKDOMElement *formElement = [document createElement:@"form"]; > WKDOMElement *inputElement = [document createElement:@"input"]; > [inputElement setAttribute:@"type" value:@"password"]; >- [[document body] appendChild:inputElement]; >+ [formElement appendChild:inputElement]; >+ [[document body] appendChild:formElement]; > > auto *jsContext = [[browserContextController mainFrame] jsContextForWorld:[WKWebProcessPlugInScriptWorld normalWorld]]; > auto *jsValue = [jsContext evaluateScript:@"document.querySelector('input')"]; >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm >index f8c39151f32d8edc24a7103b5333d191672507af..bf82d5fa3bce33dc54f5222c1505920b2d349050 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm >@@ -598,6 +598,11 @@ TEST(WebKit, DidResignInputElementStrongPasswordAppearanceWhenValueDidChange) > testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript(@"document.querySelector('input').value = ''"); > } > >+TEST(WebKit, DidResignInputElementStrongPasswordAppearanceWhenFormIsReset) >+{ >+ testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript(@"document.querySelector('form').reset()"); >+} >+ > @interface AutoFillAvailableDelegate : NSObject <WKUIDelegatePrivate> > @end > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8bc345ac8e5a378435295b650ec2e1f2b6d3dac2..f50f898dc841e2ce8392f9113c348514d9999fc3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-08 Daniel Bates <dabates@apple.com> >+ >+ Add tests to ensure that the Strong Password appearance is removed on form reset >+ https://bugs.webkit.org/show_bug.cgi?id=185440 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html: Added. >+ * fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html: Added. >+ > 2018-05-08 Daniel Bates <dabates@apple.com> > > Resign Strong Password appearance when text field value changes >diff --git a/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html b/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..078bcdca976118ade3eaa8b901a08c4e50e8debd >--- /dev/null >+++ b/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<p>This tests that that an autofilled Strong Password or Strong Confirmation Password decorated text field reverts to its original appearance when the form is reset. It can only be tested in the test tool.</p> >+<form> >+<input type="password" value="Cupertino"> >+<input type="password" value="Cupertino"> >+</form> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html b/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0128e0dd1838c3f414b463a392203e3f25d6b73f >--- /dev/null >+++ b/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html >@@ -0,0 +1,29 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="resources/process-auto-fill-button-type-and-invoke-runTest.js"></script> >+<script> >+window.markFieldsAsAutoFilled = true; >+ >+if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+function runTest() >+{ >+ let form = document.querySelector("form"); >+ form.reset(); >+ if (window.internals) >+ internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(); >+ if (window.testRunner) >+ testRunner.notifyDone(); >+} >+</script> >+</head> >+<body> >+<p>This tests that that an autofilled Strong Password or Strong Confirmation Password decorated text field reverts to its original appearance when the form is reset. It can only be tested in the test tool.</p> >+<form> >+<input type="password" value="Cupertino" data-auto-fill-button-type="StrongPassword" data-autofilled="true"> >+<input type="password" value="Cupertino" data-auto-fill-button-type="StrongConfirmationPassword" data-autofilled="true"> >+</form> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rniwa
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185440
: 339854