- Revision
- 245663
- Author
- [email protected]
- Date
- 2019-05-22 17:41:47 -0700 (Wed, 22 May 2019)
Log Message
[iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests
https://bugs.webkit.org/show_bug.cgi?id=198135
<rdar://problem/51001306>
Reviewed by Alexey Proskuryakov.
Tools:
When shouldIgnoreMetaViewport=true is specified on a test, if the following test does not use a flexible
viewport, we will continue ignoring the meta viewport, since we'll bail before we attempt to reset
WKPreferences' _shouldIgnoreMetaViewport property to NO.
We fix this by simply allowing shouldIgnoreMetaViewport to take precedence over useFlexibleViewport, such that
-[WKPreferences _shouldIgnoreMetaViewport] will always be updated to its intended value between tests.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest):
LayoutTests:
Attempt to fix a handful of viewport tests that currently try to wait for the next visible content rect update,
but end up timing out in the process. Instead, only wait for the presentation update, which is guaranteed to
happen.
* fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html:
* fast/viewport/ios/device-width-viewport-after-changing-view-scale.html:
* fast/viewport/ios/initial-scale-after-changing-view-scale.html:
* fast/viewport/ios/minimum-scale-after-changing-view-scale.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (245662 => 245663)
--- trunk/LayoutTests/ChangeLog 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/LayoutTests/ChangeLog 2019-05-23 00:41:47 UTC (rev 245663)
@@ -1,3 +1,20 @@
+2019-05-22 Wenson Hsieh <[email protected]>
+
+ [iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=198135
+ <rdar://problem/51001306>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Attempt to fix a handful of viewport tests that currently try to wait for the next visible content rect update,
+ but end up timing out in the process. Instead, only wait for the presentation update, which is guaranteed to
+ happen.
+
+ * fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html:
+ * fast/viewport/ios/device-width-viewport-after-changing-view-scale.html:
+ * fast/viewport/ios/initial-scale-after-changing-view-scale.html:
+ * fast/viewport/ios/minimum-scale-after-changing-view-scale.html:
+
2019-05-22 Saam barati <[email protected]>
WHLSL: fix enum parsing
Modified: trunk/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html (245662 => 245663)
--- trunk/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html 2019-05-23 00:41:47 UTC (rev 245663)
@@ -39,7 +39,7 @@
appendOutput(`setViewScale(${targetScale.toFixed(2)})`);
await UIHelper.setViewScale(targetScale);
- await Promise.all([UIHelper.ensureVisibleContentRectUpdate(), UIHelper.ensurePresentationUpdate()]);
+ await UIHelper.ensurePresentationUpdate();
appendOutput(`window size: [${innerWidth}, ${innerHeight}]`);
appendOutput(`square size: [${square.clientWidth}, ${square.clientHeight}]`);
Modified: trunk/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html (245662 => 245663)
--- trunk/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html 2019-05-23 00:41:47 UTC (rev 245663)
@@ -39,7 +39,7 @@
appendOutput(`setViewScale(${targetScale.toFixed(2)})`);
await UIHelper.setViewScale(targetScale);
- await Promise.all([UIHelper.ensureVisibleContentRectUpdate(), UIHelper.ensurePresentationUpdate()]);
+ await UIHelper.ensurePresentationUpdate();
appendOutput(`window size: [${innerWidth}, ${innerHeight}]`);
appendOutput(`square size: [${square.clientWidth}, ${square.clientHeight}]`);
Modified: trunk/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html (245662 => 245663)
--- trunk/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html 2019-05-23 00:41:47 UTC (rev 245663)
@@ -40,7 +40,7 @@
{
return new Promise(async resolve => {
await UIHelper.setViewScale(scale);
- await Promise.all([UIHelper.ensureVisibleContentRectUpdate(), UIHelper.ensurePresentationUpdate()]);
+ await UIHelper.ensurePresentationUpdate();
resolve(internals.pageScaleFactor().toFixed(2));
});
}
Modified: trunk/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html (245662 => 245663)
--- trunk/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html 2019-05-23 00:41:47 UTC (rev 245663)
@@ -31,7 +31,7 @@
for (const scale of [1.15, 1.25, 1.5, 1.75, 2, 2.5, 3, 1]) {
await UIHelper.setViewScale(scale);
- await Promise.all([UIHelper.ensureVisibleContentRectUpdate(), UIHelper.ensurePresentationUpdate()]);
+ await UIHelper.ensurePresentationUpdate();
appendOutput(`After setting the view scale to ${scale}, the minimum scale is: ${(await UIHelper.minimumZoomScale()).toFixed(5)}`);
appendOutput(`After setting the view scale to ${scale}, the current scale is: ${(await UIHelper.zoomScale()).toFixed(5)}`);
appendOutput("");
Modified: trunk/Tools/ChangeLog (245662 => 245663)
--- trunk/Tools/ChangeLog 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/Tools/ChangeLog 2019-05-23 00:41:47 UTC (rev 245663)
@@ -1,3 +1,21 @@
+2019-05-22 Wenson Hsieh <[email protected]>
+
+ [iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=198135
+ <rdar://problem/51001306>
+
+ Reviewed by Alexey Proskuryakov.
+
+ When shouldIgnoreMetaViewport=true is specified on a test, if the following test does not use a flexible
+ viewport, we will continue ignoring the meta viewport, since we'll bail before we attempt to reset
+ WKPreferences' _shouldIgnoreMetaViewport property to NO.
+
+ We fix this by simply allowing shouldIgnoreMetaViewport to take precedence over useFlexibleViewport, such that
+ -[WKPreferences _shouldIgnoreMetaViewport] will always be updated to its intended value between tests.
+
+ * WebKitTestRunner/ios/TestControllerIOS.mm:
+ (WTR::TestController::platformConfigureViewForTest):
+
2019-05-22 Sihui Liu <[email protected]>
API Test landed in r245540 [Mac WK2] TestWebKitAPI.WKWebView.LocalStorageProcessCrashes is a flaky failure
Modified: trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm (245662 => 245663)
--- trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2019-05-23 00:33:45 UTC (rev 245662)
+++ trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm 2019-05-23 00:41:47 UTC (rev 245663)
@@ -187,13 +187,13 @@
void TestController::platformConfigureViewForTest(const TestInvocation& test)
{
- if (!test.options().useFlexibleViewport)
- return;
-
TestRunnerWKWebView *webView = mainWebView()->platformView();
webView.configuration.preferences._shouldIgnoreMetaViewport = test.options().shouldIgnoreMetaViewport;
+ if (!test.options().useFlexibleViewport)
+ return;
+
CGRect screenBounds = [UIScreen mainScreen].bounds;
CGSize oldSize = webView.bounds.size;
mainWebView()->resizeTo(screenBounds.size.width, screenBounds.size.height, PlatformWebView::WebViewSizingMode::HeightRespectsStatusBar);