Diff
Modified: trunk/LayoutTests/ChangeLog (189390 => 189391)
--- trunk/LayoutTests/ChangeLog 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/ChangeLog 2015-09-04 22:08:28 UTC (rev 189391)
@@ -1,5 +1,22 @@
2015-09-04 Beth Dakin <[email protected]>
+ Should have a test for selection behavior when force clicking text
+ https://bugs.webkit.org/show_bug.cgi?id=148832
+
+ Reviewed by Tim Horton.
+
+ * fast/events/force-click-text-selection-behavior-expected.txt: Added.
+ * fast/events/force-click-text-selection-behavior.html: Added.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator/TestExpectations:
+ * platform/mac-mavericks/TestExpectations:
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac-wk2/TestExpectations:
+ * platform/win/TestExpectations:
+
+2015-09-04 Beth Dakin <[email protected]>
+
Should have a test for selection behavior when deep clicking a link
https://bugs.webkit.org/show_bug.cgi?id=148827
Added: trunk/LayoutTests/fast/events/force-click-text-selection-behavior-expected.txt (0 => 189391)
--- trunk/LayoutTests/fast/events/force-click-text-selection-behavior-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/force-click-text-selection-behavior-expected.txt 2015-09-04 22:08:28 UTC (rev 189391)
@@ -0,0 +1,3 @@
+Force click me.
+Select me.
+SUCCESS! We did not dismiss the selection when we force clicked the text.
Added: trunk/LayoutTests/fast/events/force-click-text-selection-behavior.html (0 => 189391)
--- trunk/LayoutTests/fast/events/force-click-text-selection-behavior.html (rev 0)
+++ trunk/LayoutTests/fast/events/force-click-text-selection-behavior.html 2015-09-04 22:08:28 UTC (rev 189391)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script>
+function checkForDone()
+{
+ var targetParent = document.getElementById("targetParent");
+ var textNode = targetParent.firstChild;
+
+ var selection = window.getSelection();
+ var anchor = selection.anchorNode;
+ if (anchor == textNode) {
+ var console = document.getElementById("console");
+ console.innerHTML = "SUCCESS! We did not dismiss the selection when we force clicked the text.";
+ }
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function startTest()
+{
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ var selection = window.getSelection();
+ var targetParent = document.getElementById("targetParent");
+ var textNode = targetParent.firstChild;
+ var range = document.createRange();
+ range.selectNodeContents(textNode);
+ selection.addRange(range);
+
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(16, 16);
+ eventSender.mouseForceClick();
+ window.setTimeout(checkForDone, 0);
+ }
+}
+</script>
+</head>
+
+<body _onload_="startTest()">
+
+<div>Force click me.</div>
+<div id="targetParent">Select me.</div>
+<pre id="console">Failed. This test must be run in the test harness. To run the test manually, select text on the page and then force click a different piece of text. The original selection should not be dismissed.</pre>
+
+</body>
+</html>
Modified: trunk/LayoutTests/platform/efl/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/efl/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -71,6 +71,7 @@
# No support for force events
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -572,6 +572,7 @@
# No support for force events
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -434,6 +434,7 @@
# No support for force events
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-mavericks/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/mac-mavericks/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/mac-mavericks/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -4,6 +4,7 @@
# No support for force events
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -126,6 +126,7 @@
# There is not yet support for force events in WK1.
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -288,6 +288,9 @@
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]
+# This is a behavioral regression.
+fast/events/force-click-text-selection-behavior.html [ Failure ]
+
### END OF (2) Classified failures without bug reports (yet)
########################################
Modified: trunk/LayoutTests/platform/win/TestExpectations (189390 => 189391)
--- trunk/LayoutTests/platform/win/TestExpectations 2015-09-04 21:53:00 UTC (rev 189390)
+++ trunk/LayoutTests/platform/win/TestExpectations 2015-09-04 22:08:28 UTC (rev 189391)
@@ -621,6 +621,7 @@
# No support for force events
fast/events/force-click-link-selection-behavior.html [ Skip ]
fast/events/force-click-on-link-navigation.html [ Skip ]
+fast/events/force-click-text-selection-behavior.html [ Skip ]
fast/events/mouse-force-changed.html [ Skip ]
fast/events/mouse-force-down.html [ Skip ]
fast/events/mouse-force-up.html [ Skip ]