WebKit Bugzilla
Attachment 370433 Details for
Bug 198135
: [iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198135-20190522124809.patch (text/plain), 7.08 KB, created by
Wenson Hsieh
on 2019-05-22 12:48:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-05-22 12:48:09 PDT
Size:
7.08 KB
patch
obsolete
>Subversion Revision: 245625 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f9b883c770fe1348a16f12e14bcf44678e0113a1..3183ddb5cb0dfd424d59f9c50a4e879b2405ba67 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-22 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests >+ https://bugs.webkit.org/show_bug.cgi?id=198135 >+ <rdar://problem/51001306> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix WPE unit tests after r245565 >diff --git a/Tools/WebKitTestRunner/ios/TestControllerIOS.mm b/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >index f0a5ea46e39e89d419a3252e247b9c9de2f9562a..7e9e1e7bb71d67e3171cb4f61f74541682f04106 100644 >--- a/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >+++ b/Tools/WebKitTestRunner/ios/TestControllerIOS.mm >@@ -187,13 +187,13 @@ void TestController::platformResetStateToConsistentValues(const TestOptions& opt > > 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); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index a7de7cdc10e42a47a41215db3de1743901178b57..deaf382390054148d4e50e5b091800e0c3801b4a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-22 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] The shouldIgnoreMetaViewport test option incorrectly persists across layout tests >+ https://bugs.webkit.org/show_bug.cgi?id=198135 >+ <rdar://problem/51001306> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Youenn Fablet <youenn@apple.com> > > Implement Feature policy self/none/* parsing >diff --git a/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html b/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html >index 31d4ed17e9bfe3f232153981010835b66cf96baf..2a80274ec33780f7539ec34a388f3c934369e545 100644 >--- a/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html >+++ b/LayoutTests/fast/viewport/ios/constant-width-viewport-after-changing-view-scale.html >@@ -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}]`); >diff --git a/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html b/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html >index 63778240de64a54e4d0173350691bc1c1622e2e3..a1287729d902e58b8c44f99f45ccbb617252a651 100644 >--- a/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html >+++ b/LayoutTests/fast/viewport/ios/device-width-viewport-after-changing-view-scale.html >@@ -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}]`); >diff --git a/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html b/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html >index 0f2a3ee33a59bba3359a34493af82083a2c62354..1500f3cea7be5ccafbbe24367d9b33a096435924 100644 >--- a/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html >+++ b/LayoutTests/fast/viewport/ios/initial-scale-after-changing-view-scale.html >@@ -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)); > }); > } >diff --git a/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html b/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html >index 1c1d52a7504f47c2dd4c751cc798152d06dd95a9..0926441a3bd7b75cc1b9d368ea47cc2e99c2ad70 100644 >--- a/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html >+++ b/LayoutTests/fast/viewport/ios/minimum-scale-after-changing-view-scale.html >@@ -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("");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ap
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198135
:
370433
|
370450
|
370459