REGRESSION (r232544): [iOS] TestWebKitAPI.WebKit.OverrideLayoutSizeChangesDuringAnima...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 19:17:39 +0000 (19:17 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 19:17:39 +0000 (19:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186395
<rdar://problem/40902427>

Reviewed by Wenson Hsieh.

* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
endAnimatedResize no longer synchronizes, so we have to wait for the next presentation update.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232593 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm

index dc87e82..8286621 100644 (file)
@@ -1,3 +1,15 @@
+2018-06-07  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r232544): [iOS] TestWebKitAPI.WebKit.OverrideLayoutSizeChangesDuringAnimatedResizeSucceed is failing
+        https://bugs.webkit.org/show_bug.cgi?id=186395
+        <rdar://problem/40902427>
+
+        Reviewed by Wenson Hsieh.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
+        (TEST):
+        endAnimatedResize no longer synchronizes, so we have to wait for the next presentation update.
+
 2018-06-07  Thibault Saunier  <tsaunier@igalia.com>
 
         [GTK][WPE] Start implementing MediaStream API
 2018-06-07  Thibault Saunier  <tsaunier@igalia.com>
 
         [GTK][WPE] Start implementing MediaStream API
index 5d292cb..0d14ed7 100644 (file)
@@ -208,15 +208,19 @@ TEST(WebKit, OverrideLayoutSizeChangesDuringAnimatedResizeSucceed)
     [webView _endAnimatedResize];
 
     __block bool didReadLayoutSize = false;
     [webView _endAnimatedResize];
 
     __block bool didReadLayoutSize = false;
-    [webView evaluateJavaScript:@"[window.innerWidth, window.innerHeight]" completionHandler:^(id value, NSError *error) {
-        CGFloat innerWidth = [[value objectAtIndex:0] floatValue];
-        CGFloat innerHeight = [[value objectAtIndex:1] floatValue];
 
 
-        EXPECT_EQ(innerWidth, 100);
-        EXPECT_EQ(innerHeight, 200);
+    [webView _doAfterNextPresentationUpdate:^{
+        [webView evaluateJavaScript:@"[window.innerWidth, window.innerHeight]" completionHandler:^(id value, NSError *error) {
+            CGFloat innerWidth = [[value objectAtIndex:0] floatValue];
+            CGFloat innerHeight = [[value objectAtIndex:1] floatValue];
 
 
-        didReadLayoutSize = true;
+            EXPECT_EQ(innerWidth, 100);
+            EXPECT_EQ(innerHeight, 200);
+
+            didReadLayoutSize = true;
+        }];
     }];
     }];
+    
     TestWebKitAPI::Util::run(&didReadLayoutSize);
 }
 
     TestWebKitAPI::Util::run(&didReadLayoutSize);
 }