Title: [244415] trunk/Tools
- Revision
- 244415
- Author
- [email protected]
- Date
- 2019-04-17 18:02:52 -0700 (Wed, 17 Apr 2019)
Log Message
[iOS Sim Debug] REGRESSION (r244151) TestWebKitAPI.WebKit.OverrideViewportArguments is failing (197028)
https://bugs.webkit.org/show_bug.cgi?id=197028
<rdar://problem/49985290>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm:
(TEST):
Liberal application of waitForNextPresentationUpdate works around a race
where if the page rapidly changes its viewport arguments (or an API client
rapidly changes its viewport arguments), we'd get stuck thinking that the
user had intentionally zoomed the page, and stop resetting the initial scale.
This deserves a separate bug, but no need to keep the test failing while
we think about it.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (244414 => 244415)
--- trunk/Tools/ChangeLog 2019-04-18 00:42:36 UTC (rev 244414)
+++ trunk/Tools/ChangeLog 2019-04-18 01:02:52 UTC (rev 244415)
@@ -1,5 +1,22 @@
2019-04-17 Tim Horton <[email protected]>
+ [iOS Sim Debug] REGRESSION (r244151) TestWebKitAPI.WebKit.OverrideViewportArguments is failing (197028)
+ https://bugs.webkit.org/show_bug.cgi?id=197028
+ <rdar://problem/49985290>
+
+ Reviewed by Wenson Hsieh.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm:
+ (TEST):
+ Liberal application of waitForNextPresentationUpdate works around a race
+ where if the page rapidly changes its viewport arguments (or an API client
+ rapidly changes its viewport arguments), we'd get stuck thinking that the
+ user had intentionally zoomed the page, and stop resetting the initial scale.
+ This deserves a separate bug, but no need to keep the test failing while
+ we think about it.
+
+2019-04-17 Tim Horton <[email protected]>
+
REGRESSION (r241988): Switching tabs is slow
https://bugs.webkit.org/show_bug.cgi?id=197037
<rdar://problem/49951473>
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm (244414 => 244415)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm 2019-04-18 00:42:36 UTC (rev 244414)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm 2019-04-18 01:02:52 UTC (rev 244415)
@@ -42,35 +42,38 @@
return [webView stringByEvaluatingJavaScript:@"document.body.clientWidth"];
};
+ auto setViewport = ^(NSDictionary *viewport) {
+ [webView _overrideViewportWithArguments:viewport];
+ [webView waitForNextPresentationUpdate];
+ };
+
[webView synchronouslyLoadHTMLString:@"<meta name='viewport' content='initial-scale=1'><div id='divWithViewportUnits' style='width: 100vw;'></div>"];
EXPECT_WK_STREQ("20", bodyWidth());
- [webView _overrideViewportWithArguments:@{ @"width" : @"1000" }];
+ setViewport(@{ @"width" : @"1000" });
EXPECT_WK_STREQ("1000", bodyWidth());
- [webView _overrideViewportWithArguments:@{ @"width" : @"1000", @"initial-scale": @"1" }];
- [webView waitForNextPresentationUpdate];
+ setViewport(@{ @"width" : @"1000", @"initial-scale": @"1" });
EXPECT_WK_STREQ("1000", bodyWidth());
EXPECT_EQ(1., [webView scrollView].zoomScale);
- [webView _overrideViewportWithArguments:@{ @"width" : @"1000", @"initial-scale": @"5" }];
- [webView waitForNextPresentationUpdate];
+ setViewport(@{ @"width" : @"1000", @"initial-scale": @"5" });
EXPECT_WK_STREQ("1000", bodyWidth());
EXPECT_EQ(5., [webView scrollView].zoomScale);
- [webView _overrideViewportWithArguments:nil];
+ setViewport(nil);
EXPECT_WK_STREQ("20", bodyWidth());
[webView synchronouslyLoadHTMLString:@"<meta name='viewport' content='width=10'><div id='divWithViewportUnits' style='width: 100vw;'></div>"];
EXPECT_WK_STREQ("10", bodyWidth());
- [webView _overrideViewportWithArguments:@{ @"width" : @"1000", @"initial-scale": @"1" }];
+ setViewport(@{ @"width" : @"1000", @"initial-scale": @"1" });
EXPECT_WK_STREQ("1000", bodyWidth());
- [webView _overrideViewportWithArguments:@{ @"width" : @"device-width", @"initial-scale": @"1" }];
+ setViewport(@{ @"width" : @"device-width", @"initial-scale": @"1" });
EXPECT_WK_STREQ("20", bodyWidth());
- [webView _overrideViewportWithArguments:@{ @"width" : @"500", @"initial-scale": @"1", @"garbage": @"nonsense" }];
+ setViewport(@{ @"width" : @"500", @"initial-scale": @"1", @"garbage": @"nonsense" });
EXPECT_WK_STREQ("500", bodyWidth());
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes