Title: [228146] trunk/LayoutTests
Revision
228146
Author
[email protected]
Date
2018-02-05 17:44:06 -0800 (Mon, 05 Feb 2018)

Log Message

iOS WK2: fast/visual-viewport/resize-event-fired.html crashes with GuardMalloc
https://bugs.webkit.org/show_bug.cgi?id=182504
rdar://problem/36386435

Reviewed by Wenson Hsieh.

Don't end the test until both the resize handler has been called, and the zoom is complete, to
avoid leaving dangling zoom completion handlers.

* fast/visual-viewport/resize-event-fired.html:
* platform/ios/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (228145 => 228146)


--- trunk/LayoutTests/ChangeLog	2018-02-06 01:28:17 UTC (rev 228145)
+++ trunk/LayoutTests/ChangeLog	2018-02-06 01:44:06 UTC (rev 228146)
@@ -1,3 +1,17 @@
+2018-02-05  Simon Fraser  <[email protected]>
+
+        iOS WK2: fast/visual-viewport/resize-event-fired.html crashes with GuardMalloc
+        https://bugs.webkit.org/show_bug.cgi?id=182504
+        rdar://problem/36386435
+
+        Reviewed by Wenson Hsieh.
+        
+        Don't end the test until both the resize handler has been called, and the zoom is complete, to
+        avoid leaving dangling zoom completion handlers.
+
+        * fast/visual-viewport/resize-event-fired.html:
+        * platform/ios/TestExpectations:
+
 2018-02-05  Chris Dumez  <[email protected]>
 
         Unreviewed, unskip fetch-event-respond-with-partial-stream.https.html as it no longer times out

Modified: trunk/LayoutTests/fast/visual-viewport/resize-event-fired.html (228145 => 228146)


--- trunk/LayoutTests/fast/visual-viewport/resize-event-fired.html	2018-02-06 01:28:17 UTC (rev 228145)
+++ trunk/LayoutTests/fast/visual-viewport/resize-event-fired.html	2018-02-06 01:44:06 UTC (rev 228146)
@@ -16,11 +16,23 @@
 
     var test = async_test('Verify a resize event gets fired on window.visualViewport after pinch-zoom');
 
-    function resizeHandler() {
-        test.done();
+    var resizeDone = false;
+    var zoomDone = false;
+
+    function checkForDone()
+    {
+        if (resizeDone && zoomDone)
+            test.done();
     }
 
-    function getUIScript() {
+    function resizeHandler()
+    {
+        resizeDone = true;
+        checkForDone();
+    }
+
+    function getUIScript()
+    {
         return `(function() {
             uiController.zoomToScale(${pageScaleFactor}, function() {
                 uiController.uiScriptComplete(uiController.zoomScale);
@@ -30,6 +42,9 @@
 
     window._onload_ = function() {
         window.visualViewport.addEventListener('resize', resizeHandler);
-        testRunner.runUIScript(getUIScript(), function() {});
+        testRunner.runUIScript(getUIScript(), function() {
+            zoomDone = true;
+            checkForDone();
+        });
     };
 </script>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (228145 => 228146)


--- trunk/LayoutTests/platform/ios/TestExpectations	2018-02-06 01:28:17 UTC (rev 228145)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2018-02-06 01:44:06 UTC (rev 228146)
@@ -3278,6 +3278,3 @@
 webkit.org/b/181838 js/slow-stress/Int32Array-alloc-huge-long-lived.html [ Slow ]
 
 webkit.org/b/182422 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html [ Skip ]
-
-# <rdar://problem/36386435>
-fast/visual-viewport/resize-event-fired.html [ Skip ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to