Title: [210538] trunk/LayoutTests
- Revision
- 210538
- Author
- rn...@webkit.org
- Date
- 2017-01-09 23:02:20 -0800 (Mon, 09 Jan 2017)
Log Message
Add an iOS test for tapping on a text node assigned to a slot
https://bugs.webkit.org/show_bug.cgi?id=166877
Reviewed by Andy Estes.
Add a test for tapping on a text node assigned to a slot.
touchstart event must be fired on a parent of the slot with a touch event handler.
* TestExpectations:
* fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt: Added.
* fast/shadow-dom/touch-event-on-text-assigned-to-slot.html: Added.
* resources/ui-helper.js:
(window.UIHelper.tapAt): Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (210537 => 210538)
--- trunk/LayoutTests/ChangeLog 2017-01-10 05:58:19 UTC (rev 210537)
+++ trunk/LayoutTests/ChangeLog 2017-01-10 07:02:20 UTC (rev 210538)
@@ -1,3 +1,19 @@
+2017-01-09 Ryosuke Niwa <rn...@webkit.org>
+
+ Add an iOS test for tapping on a text node assigned to a slot
+ https://bugs.webkit.org/show_bug.cgi?id=166877
+
+ Reviewed by Andy Estes.
+
+ Add a test for tapping on a text node assigned to a slot.
+ touchstart event must be fired on a parent of the slot with a touch event handler.
+
+ * TestExpectations:
+ * fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt: Added.
+ * fast/shadow-dom/touch-event-on-text-assigned-to-slot.html: Added.
+ * resources/ui-helper.js:
+ (window.UIHelper.tapAt): Added.
+
2017-01-09 Yusuke Suzuki <utatane....@gmail.com>
Implement JSSourceCode to propagate SourceCode in module pipeline
Modified: trunk/LayoutTests/TestExpectations (210537 => 210538)
--- trunk/LayoutTests/TestExpectations 2017-01-10 05:58:19 UTC (rev 210537)
+++ trunk/LayoutTests/TestExpectations 2017-01-10 07:02:20 UTC (rev 210538)
@@ -33,6 +33,8 @@
media/controls/ipad [ Skip ]
fast/text-autosizing [ Skip ]
+fast/shadow-dom/touch-event-on-text-assigned-to-slot.html [ Skip ]
+
fast/forms/attributed-strings.html [ Skip ]
fast/scrolling/latching [ Skip ]
Added: trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt (0 => 210538)
--- trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot-expected.txt 2017-01-10 07:02:20 UTC (rev 210538)
@@ -0,0 +1,4 @@
+Tests for tapping on a text node assigned to a slot. touchstart should fire on the slot.
+
+Tap here
+PASS
Added: trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot.html (0 => 210538)
--- trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot.html (rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/touch-event-on-text-assigned-to-slot.html 2017-01-10 07:02:20 UTC (rev 210538)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>Tests for tapping on a text node assigned to a slot. touchstart should fire on the slot.</p>
+<div id="target">Tap here</div>
+<div id="result"></div>
+<script src=""
+<script>
+
+var target = document.getElementById('target');
+var result = document.getElementById('result');
+
+let shadowRoot = target.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = `<span><slot></slot></span>`;
+shadowRoot.querySelector('span').addEventListener('touchstart', (event) => {
+ result.textContent = 'PASS';
+});
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ UIHelper.wait(UIHelper.tapAt(target.offsetLeft + 5, target.offsetTop + 5).then(() => {
+ if (!result.textContent)
+ result.textContent = 'FAIL';
+ }));
+}
+
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (210537 => 210538)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-01-10 05:58:19 UTC (rev 210537)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-01-10 07:02:20 UTC (rev 210538)
@@ -141,6 +141,7 @@
# No touch events
fast/events/touch [ Skip ]
fast/shadow-dom/touch-event-ios.html [ Skip ]
+fast/shadow-dom/touch-event-on-text-assigned-to-slot.html [ Skip ]
http/tests/quicklook/at-import-stylesheet-blocked.html [ Skip ]
http/tests/quicklook/base-url-blocked.html [ Skip ]
http/tests/quicklook/cross-origin-iframe-blocked.html [ Skip ]
Modified: trunk/LayoutTests/resources/ui-helper.js (210537 => 210538)
--- trunk/LayoutTests/resources/ui-helper.js 2017-01-10 05:58:19 UTC (rev 210537)
+++ trunk/LayoutTests/resources/ui-helper.js 2017-01-10 07:02:20 UTC (rev 210538)
@@ -10,6 +10,26 @@
return window.testRunner.isWebKit2;
}
+ static tapAt(x, y)
+ {
+ console.assert(this.isIOS());
+
+ if (!this.isWebKit2()) {
+ eventSender.addTouchPoint(x, y);
+ eventSender.touchStart();
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+ return Promise.resolve();
+ }
+
+ return new Promise((resolve) => {
+ testRunner.runUIScript(`
+ uiController.singleTapAtPoint(${x}, ${y}, function() {
+ uiController.uiScriptComplete('Done');
+ });`, resolve);
+ });
+ }
+
static activateAt(x, y)
{
if (!this.isWebKit2() || !this.isIOS()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes