Title: [231519] trunk
- Revision
- 231519
- Author
- [email protected]
- Date
- 2018-05-08 16:22:06 -0700 (Tue, 08 May 2018)
Log Message
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 Ryosuke Niwa.
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm:
(-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(TEST):
LayoutTests:
* 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (231518 => 231519)
--- trunk/LayoutTests/ChangeLog 2018-05-08 23:20:33 UTC (rev 231518)
+++ trunk/LayoutTests/ChangeLog 2018-05-08 23:22:06 UTC (rev 231519)
@@ -1,5 +1,15 @@
2018-05-08 Daniel Bates <[email protected]>
+ 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 Ryosuke Niwa.
+
+ * 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 <[email protected]>
+
Resign Strong Password appearance when text field value changes
https://bugs.webkit.org/show_bug.cgi?id=185433
<rdar://problem/39958508>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html (0 => 231519)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset-expected.html 2018-05-08 23:22:06 UTC (rev 231519)
@@ -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>
Added: trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html (0 => 231519)
--- trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html (rev 0)
+++ trunk/LayoutTests/fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-form-is-reset.html 2018-05-08 23:22:06 UTC (rev 231519)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function runTest()
+{
+ document.forms[0].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>
Modified: trunk/Tools/ChangeLog (231518 => 231519)
--- trunk/Tools/ChangeLog 2018-05-08 23:20:33 UTC (rev 231518)
+++ trunk/Tools/ChangeLog 2018-05-08 23:22:06 UTC (rev 231519)
@@ -1,5 +1,17 @@
2018-05-08 Daniel Bates <[email protected]>
+ 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 Ryosuke Niwa.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm:
+ (-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
+ * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
+ (TEST):
+
+2018-05-08 Daniel Bates <[email protected]>
+
Resign Strong Password appearance when text field value changes
https://bugs.webkit.org/show_bug.cgi?id=185433
<rdar://problem/39958508>
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm (231518 => 231519)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm 2018-05-08 23:20:33 UTC (rev 231518)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm 2018-05-08 23:22:06 UTC (rev 231519)
@@ -60,9 +60,11 @@
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')"];
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (231518 => 231519)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2018-05-08 23:20:33 UTC (rev 231518)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2018-05-08 23:22:06 UTC (rev 231519)
@@ -598,6 +598,11 @@
testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript(@"document.querySelector('input').value = ''");
}
+TEST(WebKit, DidResignInputElementStrongPasswordAppearanceWhenFormIsReset)
+{
+ testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript(@"document.forms[0].reset()");
+}
+
@interface AutoFillAvailableDelegate : NSObject <WKUIDelegatePrivate>
@end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes