Title: [102477] trunk/LayoutTests
Revision
102477
Author
[email protected]
Date
2011-12-09 14:48:16 -0800 (Fri, 09 Dec 2011)

Log Message

[MutationObservers] Add test for deliver-at-end-of-task semantics
https://bugs.webkit.org/show_bug.cgi?id=74190

Reviewed by Ojan Vafai.

The addition of eventSender.scheduleAsynchronousKeyDown in r102424
allows testing the code added in r101842 and http://crrev.com/113010.

Added a test using a contentEditable element and an onblur event
handler that asserts it fires after mutations due to editing have been
delivered.

* fast/mutation/end-of-task-delivery-expected.txt: Added.
* fast/mutation/end-of-task-delivery.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (102476 => 102477)


--- trunk/LayoutTests/ChangeLog	2011-12-09 22:48:01 UTC (rev 102476)
+++ trunk/LayoutTests/ChangeLog	2011-12-09 22:48:16 UTC (rev 102477)
@@ -1,3 +1,20 @@
+2011-12-09  Adam Klein  <[email protected]>
+
+        [MutationObservers] Add test for deliver-at-end-of-task semantics
+        https://bugs.webkit.org/show_bug.cgi?id=74190
+
+        Reviewed by Ojan Vafai.
+
+        The addition of eventSender.scheduleAsynchronousKeyDown in r102424
+        allows testing the code added in r101842 and http://crrev.com/113010.
+
+        Added a test using a contentEditable element and an onblur event
+        handler that asserts it fires after mutations due to editing have been
+        delivered.
+
+        * fast/mutation/end-of-task-delivery-expected.txt: Added.
+        * fast/mutation/end-of-task-delivery.html: Added.
+
 2011-12-09  David Levin  <[email protected]>
 
         Regression(r53595): Sync xhr requests in workers aren't terminated on worker close.

Added: trunk/LayoutTests/fast/mutation/end-of-task-delivery-expected.txt (0 => 102477)


--- trunk/LayoutTests/fast/mutation/end-of-task-delivery-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/mutation/end-of-task-delivery-expected.txt	2011-12-09 22:48:16 UTC (rev 102477)
@@ -0,0 +1 @@
+PASSED
Property changes on: trunk/LayoutTests/fast/mutation/end-of-task-delivery-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/fast/mutation/end-of-task-delivery.html (0 => 102477)


--- trunk/LayoutTests/fast/mutation/end-of-task-delivery.html	                        (rev 0)
+++ trunk/LayoutTests/fast/mutation/end-of-task-delivery.html	2011-12-09 22:48:16 UTC (rev 102477)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<ol contenteditable>
+    <li>Press enter
+</ol>
+<p>Then click here</p>
+<script>
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+
+    var list = document.querySelector('ol');
+    var p = document.querySelector('p');
+    var observerRuns = 0;
+    var observer = new WebKitMutationObserver(function() { ++observerRuns; });
+    observer.observe(list, {childList: true});
+    list.addEventListener('blur', function() {
+        document.body.innerHTML = observerRuns == 1 ? 'PASSED' : 'FAILED';
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
+    });
+    list.focus();
+    if (window.eventSender) {
+        eventSender.scheduleAsynchronousKeyDown('\n');
+        eventSender.mouseMoveTo(p.offsetLeft + p.offsetWidth / 2, p.offsetTop + p.offsetHeight / 2);
+        eventSender.scheduleAsynchronousClick();
+    }
+</script>
Property changes on: trunk/LayoutTests/fast/mutation/end-of-task-delivery.html
___________________________________________________________________

Added: svn:eol-style

_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to