WebKit Bugzilla
Attachment 356653 Details for
Bug 192425
: [iOS] Add test to ensure that a web page can prevent the default for Command + A
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Layout test
bug-192425-20181205134603.patch (text/plain), 3.17 KB, created by
Daniel Bates
on 2018-12-05 13:46:04 PST
(
hide
)
Description:
Layout test
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-12-05 13:46:04 PST
Size:
3.17 KB
patch
obsolete
>Subversion Revision: 238894 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c2c64feffb8df332b1b127aaab522f3a3e52d0de..98f2f2392b1852d34cfa95a0bd5c0b97f079a66d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2018-12-05 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Add test to ensure that a web page can prevent the default for Command + A >+ https://bugs.webkit.org/show_bug.cgi?id=192425 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Skip the test until we have the UIKit fix for <rdar://problem/46430796>. >+ >+ * fast/events/ios/key-command-select-all-prevent-default.html: Added. >+ * platform/ios/TestExpectations: >+ > 2018-12-05 Alicia Boya GarcÃa <aboya@igalia.com> > > [MSE][GStreamer] Remove the AppendPipeline state machine >diff --git a/LayoutTests/fast/events/ios/key-command-select-all-prevent-default.html b/LayoutTests/fast/events/ios/key-command-select-all-prevent-default.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5800d8a4efdc9e4c98b44cceed5b16168cac8c74 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/key-command-select-all-prevent-default.html >@@ -0,0 +1,48 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+<script> >+window.jsTestIsAsync = true; >+ >+let testElement; >+ >+function handleKeyDown(event) >+{ >+ if (!event.metaKey || event.key !== "a") >+ return; >+ >+ event.preventDefault(); >+ testElement.removeEventListener("keydown", handleKeyDown, true); >+ >+ shouldBeEqualToString("window.getSelection().type", "Caret"); >+ document.body.removeChild(testElement); // To make the output pretty. >+ finishJSTest(); >+} >+ >+function handleFocus() >+{ >+ testElement.addEventListener("keydown", handleKeyDown, true); >+ if (window.testRunner) >+ UIHelper.keyDown("a", ["metaKey"]); >+} >+ >+function runTest() >+{ >+ testElement = document.getElementById("test"); >+ >+ description("Tests that preventDefault() when Command + A is pressed prevents selection."); >+ >+ testElement.addEventListener("focus", handleFocus, { once: true }); >+ if (window.testRunner) >+ UIHelper.activateFormControl(testElement); >+ else >+ testElement.focus(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+<div id="test" contenteditable="true">Press Command + A to select all this text.</div> >+</body> >+</html> >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index fc23976e6649618c859d021743cf1a252f435936..a16d3662f5106d3a379a797e780acd44c712e32a 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -3222,3 +3222,6 @@ webkit.org/b/190764 editing/spelling/spelling-dots-repaint.html [ Skip ] > webkit.org/b/190764 editing/spelling/spelling-dots-position.html [ Skip ] > webkit.org/b/190764 editing/spelling/spelling-dots-position-2.html [ Skip ] > webkit.org/b/190764 editing/spelling/spelling-dots-position-3.html [ Skip ] >+ >+# FIXME: Unskip the following test once we have the fix for <rdar://problem/46430796>. >+fast/events/ios/key-command-select-all-prevent-default.html [ Skip ]
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:
wenson_hsieh
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192425
: 356653 |
356694