Title: [223639] trunk/LayoutTests
- Revision
- 223639
- Author
- [email protected]
- Date
- 2017-10-18 16:14:34 -0700 (Wed, 18 Oct 2017)
Log Message
Add test to ensure that text-overflow: ellipsis text is scrollable
https://bugs.webkit.org/show_bug.cgi?id=178395
Reviewed by Zalan Bujtas.
* fast/text/scroll-text-overflow-ellipsis-expected.html: Added.
* fast/text/scroll-text-overflow-ellipsis.html: Added.
* platform/ios-wk1/TestExpectations: For now, skip the test in legacy WebKit on iOS
as eventSender.keyDown() does not seem to be dispatching a keyboard event to the
focused field. See <https://bugs.webkit.org/show_bug.cgi?id=178490>.
* resources/ui-helper.js:
(window.UIHelper.keyDown.return.new.Promise):
(window.UIHelper.keyDown):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (223638 => 223639)
--- trunk/LayoutTests/ChangeLog 2017-10-18 23:09:56 UTC (rev 223638)
+++ trunk/LayoutTests/ChangeLog 2017-10-18 23:14:34 UTC (rev 223639)
@@ -1,3 +1,19 @@
+2017-10-18 Daniel Bates <[email protected]>
+
+ Add test to ensure that text-overflow: ellipsis text is scrollable
+ https://bugs.webkit.org/show_bug.cgi?id=178395
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/text/scroll-text-overflow-ellipsis-expected.html: Added.
+ * fast/text/scroll-text-overflow-ellipsis.html: Added.
+ * platform/ios-wk1/TestExpectations: For now, skip the test in legacy WebKit on iOS
+ as eventSender.keyDown() does not seem to be dispatching a keyboard event to the
+ focused field. See <https://bugs.webkit.org/show_bug.cgi?id=178490>.
+ * resources/ui-helper.js:
+ (window.UIHelper.keyDown.return.new.Promise):
+ (window.UIHelper.keyDown):
+
2017-10-17 Dean Jackson <[email protected]>
Make failing WebGL tests produce debug output
Added: trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis-expected.html (0 => 223639)
--- trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis-expected.html 2017-10-18 23:14:34 UTC (rev 223639)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+body {
+ margin: 0;
+ padding: 0;
+}
+
+#expected {
+ width: 55px;
+ height: 55px;
+ background-color: green;
+}
+</style>
+</head>
+<body>
+<div id="expected"></div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis.html (0 => 223639)
--- trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis.html (rev 0)
+++ trunk/LayoutTests/fast/text/scroll-text-overflow-ellipsis.html 2017-10-18 23:14:34 UTC (rev 223639)
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<style>
+body {
+ margin: 0;
+ padding: 0;
+}
+
+.hidden {
+ display: none;
+}
+
+#ellipsizedText {
+ font-size: 300%;
+ text-overflow: ellipsis;
+ display: inline-block;
+ overflow: hidden;
+ white-space: nowrap;
+ width: 55px;
+ height: 55px;
+ background-color: green;
+ color: red;
+}
+</style>
+</head>
+<body>
+<div id="manual-instructions" class="hidden">
+ <p>Tests that a text-overflow box is scrollable. To run by hand, perform the following:</p>
+ <ol>
+ <li>Click anywhere in the green box (below) to focus it.</li>
+ <li>Press the down arrow on the keyboard.</li>
+ </ol>
+ <p>This test PASSED if you see a solid green square. Otherwise, it FAILED.</p>
+</div>
+<div id="ellipsizedText" contenteditable="true">abcde</div>
+<script>
+function runTest()
+{
+ function scrollToEndOfLine()
+ {
+ return UIHelper.keyDown("downArrow");
+ }
+
+ function done()
+ {
+ document.getElementById("ellipsizedText").blur(); // To avoid painting the caret.
+ testRunner.notifyDone();
+ }
+
+ UIHelper.activateAndWaitForInputSessionAt(0, 0).then(scrollToEndOfLine).then(done);
+}
+
+if (!window.testRunner)
+ document.getElementById("manual-instructions").classList.remove("hidden"); // Show manual instructions
+else {
+ testRunner.waitUntilDone();
+
+ runTest();
+}
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (223638 => 223639)
--- trunk/LayoutTests/platform/ios-wk1/TestExpectations 2017-10-18 23:09:56 UTC (rev 223638)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations 2017-10-18 23:14:34 UTC (rev 223639)
@@ -1901,3 +1901,6 @@
http/tests/css/filters-on-iframes.html [ Skip ]
webkit.org/b/172092 [ Release ] fast/parser/adoption-agency-unload-iframe-4.html [ Timeout ]
+
+# FIXME: For some reason EventSender.keyDown() does not work.
+webkit.org/b/178490 fast/text/scroll-text-overflow-ellipsis.html [ Skip ]
Modified: trunk/LayoutTests/resources/ui-helper.js (223638 => 223639)
--- trunk/LayoutTests/resources/ui-helper.js 2017-10-18 23:09:56 UTC (rev 223638)
+++ trunk/LayoutTests/resources/ui-helper.js 2017-10-18 23:14:34 UTC (rev 223639)
@@ -47,6 +47,21 @@
});
}
+ static keyDown(key)
+ {
+ if (!this.isWebKit2() || !this.isIOS()) {
+ eventSender.keyDown(key);
+ return Promise.resolve();
+ }
+
+ return new Promise((resolve) => {
+ testRunner.runUIScript(`
+ uiController.keyDownUsingHardwareKeyboard("downArrow", function() {
+ uiController.uiScriptComplete("Done");
+ });`, resolve);
+ });
+ }
+
static ensurePresentationUpdate()
{
if (!this.isWebKit2()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes