WebKit Bugzilla
Attachment 372099 Details for
Bug 198848
: [ContentChangeObserver] LayoutTest/fast/content-observation/click-event-suppression-on-content-change.html is failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198848-20190613193512.patch (text/plain), 8.69 KB, created by
zalan
on 2019-06-13 19:35:12 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-13 19:35:12 PDT
Size:
8.69 KB
patch
obsolete
>Subversion Revision: 246233 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 74e8b9e7e994f9d394b7b52853d074c087313e8a..46a18793091917e5e63e01d1f24a5be46078163b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-13 Zalan Bujtas <zalan@apple.com> >+ >+ [ContentChangeObserver] LayoutTest/fast/content-observation/click-event-suppression-on-content-change.html is failing >+ https://bugs.webkit.org/show_bug.cgi?id=198848 >+ <rdar://problem/51689630> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 1. Enable content observation for this test. >+ 2. Add role attribute to trigger fast click-through -less flaky with the sleeps. >+ 3. Use UIHelper functions. >+ >+ * fast/content-observation/click-event-suppression-on-content-change.html: Removed. >+ * fast/events/touch/ios/content-observation/click-event-suppression-on-content-change-expected.txt: Renamed from LayoutTests/fast/content-observation/click-event-suppression-on-content-change-expected.txt. >+ * fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html: Added. >+ > 2019-06-08 Cathie Chen <cathiechen@igalia.com> > > resize-observer/element-leak.html fails on Windows platform >diff --git a/LayoutTests/fast/content-observation/click-event-suppression-on-content-change-expected.txt b/LayoutTests/fast/content-observation/click-event-suppression-on-content-change-expected.txt >deleted file mode 100644 >index 9c0e91c379ce73a1d84c9b7dd2e64804466173ed..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/content-observation/click-event-suppression-on-content-change-expected.txt >+++ /dev/null >@@ -1,14 +0,0 @@ >-Test that if document is visibly mutated in mouseover handler then synthetic click is not generated until the next tap. >-Tapping once >-mouseover >-mouseclick >-Tapping again >-mouseclick >-Tapping out >-mouseout >-Enabling mutation on mouseover >-Tapping once >-mouseover >-Tapping again >-mouseclick >- >diff --git a/LayoutTests/fast/content-observation/click-event-suppression-on-content-change.html b/LayoutTests/fast/content-observation/click-event-suppression-on-content-change.html >deleted file mode 100644 >index dd88b188479858ca14ed17631094985f4f1078cf..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/content-observation/click-event-suppression-on-content-change.html >+++ /dev/null >@@ -1,85 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<style> >-#neutral { position:absolute; top:0px; left:100px; width:100px; height:100px; border:2px solid blue; } >-#test { position:absolute; top:100px; left:100px; width:100px; height:100px; border:2px solid blue; } >-#test div { border: 2px solid red; width: 10px; height: 10px; } >-</style> >-<script> >-if (window.testRunner) { >- testRunner.dumpAsText(); >- testRunner.waitUntilDone(); >-} >- >-var outputText = ""; >- >-function output(text) { >- outputText += text + '<br>'; >-} >- >-var mutateOnMouseOver = false; >- >-function mouseOver() { >- if (mutateOnMouseOver) { >- let newContent = document.createElement("div"); >- newContent.addEventListener("click", function( event ) { >- console.log("clicked"); >- }, false); >- document.querySelector('#test').appendChild(newContent); >- } >- output('mouseover'); >-} >-function mouseOut() { >- output('mouseout'); >-} >-function mouseClick() { >- output('mouseclick'); >-} >- >-function getTapUIScript(x, y) >-{ >- return ` >- (function() { >- uiController.singleTapAtPoint(${x}, ${y}, function() { >- uiController.uiScriptComplete("Done"); >- }); >- })();` >-} >- >-function test() { >- if (!window.testRunner || !window.testRunner.runUIScript) >- return; >- // Test tapping in a div. >- output("Tapping once"); >- testRunner.runUIScript(getTapUIScript(150, 150), function(result) { >- output("Tapping again"); >- testRunner.runUIScript(getTapUIScript(150, 150), function(result) { >- output("Tapping out"); >- testRunner.runUIScript(getTapUIScript(150, 50), function(result) { >- output("Enabling mutation on mouseover"); >- mutateOnMouseOver = true; >- output("Tapping once"); >- testRunner.runUIScript(getTapUIScript(150, 150), function(result) { >- output("Tapping again"); >- testRunner.runUIScript(getTapUIScript(150, 150), function(result) { >- document.querySelector('#output').innerHTML += outputText; >- testRunner.notifyDone(); >- }); >- }); >- }); >- }); >- }); >-} >- >-</script> >-</head> >-<body onload="test()"> >- <div>Test that if document is visibly mutated in mouseover handler then synthetic click is not generated until the next tap.</div> >- <div id='neutral' onmouseover='' onmouseout='' onclick=''> >- </div> >- <div id='test' onmouseover='mouseOver()' onmouseout='mouseOut()' onclick='mouseClick()'> >- </div> >- <div id='output'></div> >-</body> >-</html> >diff --git a/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change-expected.txt b/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..9c0e91c379ce73a1d84c9b7dd2e64804466173ed >--- /dev/null >+++ b/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change-expected.txt >@@ -0,0 +1,14 @@ >+Test that if document is visibly mutated in mouseover handler then synthetic click is not generated until the next tap. >+Tapping once >+mouseover >+mouseclick >+Tapping again >+mouseclick >+Tapping out >+mouseout >+Enabling mutation on mouseover >+Tapping once >+mouseover >+Tapping again >+mouseclick >+ >diff --git a/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html b/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html >new file mode 100644 >index 0000000000000000000000000000000000000000..53fb8f2e16679af272031addfdf3eee732229e4a >--- /dev/null >+++ b/LayoutTests/fast/events/touch/ios/content-observation/click-event-suppression-on-content-change.html >@@ -0,0 +1,84 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<html> >+<head> >+<meta name="viewport" content="width=device-width initial-scale=1 user-scalable=no"> >+<script src="../../../../../resources/ui-helper.js"></script> >+<style> >+#neutral { position:absolute; top:0px; left:100px; width:100px; height:100px; border:2px solid blue; } >+#testDiv { position:absolute; top:100px; left:100px; width:100px; height:100px; border:2px solid blue; } >+#testDiv div { border: 2px solid red; width: 10px; height: 10px; } >+</style> >+<script> >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+} >+if (window.internals) >+ internals.settings.setContentChangeObserverEnabled(true); >+ >+var outputText = ""; >+ >+function output(text) { >+ outputText += text + '<br>'; >+} >+ >+var mutateOnMouseOver = false; >+ >+function mouseOver() { >+ if (mutateOnMouseOver) { >+ let newContent = document.createElement("div"); >+ newContent.addEventListener("click", function( event ) { >+ }, false); >+ document.querySelector('#testDiv').appendChild(newContent); >+ } >+ output('mouseover'); >+} >+function mouseOut() { >+ output('mouseout'); >+} >+function mouseClick() { >+ output('mouseclick'); >+} >+ >+async function test() { >+ if (!window.testRunner || !window.testRunner.runUIScript) >+ return; >+ // Test tapping in a div. >+ output("Tapping once"); >+ await UIHelper.tapAt(150, 150); >+ await UIHelper.delayFor(50); >+ >+ output("Tapping again"); >+ await UIHelper.tapAt(150, 150); >+ await UIHelper.delayFor(50); >+ >+ output("Tapping out"); >+ await UIHelper.tapAt(150, 50); >+ await UIHelper.delayFor(50); >+ >+ output("Enabling mutation on mouseover"); >+ testDiv.removeAttribute("role"); >+ mutateOnMouseOver = true; >+ output("Tapping once"); >+ await UIHelper.tapAt(150, 150); >+ await UIHelper.delayFor(50); >+ >+ output("Tapping again"); >+ await UIHelper.tapAt(150, 150); >+ await UIHelper.delayFor(50); >+ >+ document.querySelector('#output').innerHTML += outputText; >+ testRunner.notifyDone(); >+} >+ >+</script> >+</head> >+<body onload="test()"> >+ <div>Test that if document is visibly mutated in mouseover handler then synthetic click is not generated until the next tap.</div> >+ <div id='neutral' onmouseover='' onmouseout='' onclick=''> >+ </div> >+ <div role="checkbox" id='testDiv' onmouseover='mouseOver()' onmouseout='mouseOut()' onclick='mouseClick()'> >+ </div> >+ <div id='output'></div> >+</body> >+</html>
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198848
: 372099