Title: [262800] trunk/Tools
- Revision
- 262800
- Author
- [email protected]
- Date
- 2020-06-09 11:46:20 -0700 (Tue, 09 Jun 2020)
Log Message
WebKit.ShrinkToFit is failing on some bots
https://bugs.webkit.org/show_bug.cgi?id=212932
<rdar://problem/60972407>
Reviewed by Simon Fraser.
TestWebKitAPI was failing to stabilize the overlay scrollbar preference,
because the only stabilization attempt was in the injected bundle
initialization code, and most tests (including ShrinkToFit) do not have
an injected bundle.
Because this preference is manually propagated to the Web Content process,
we can set the default in the volatile domain in the UI process at startup.
We can't move other preferences yet, because they are not manually propagated,
and WebKit's NSUserDefault synchronization mechanism ignores defaults in the
volatile domain (and the initial preference load reads from disk, not
from the UI process, so it wouldn't find them anyway).
* TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm:
(TEST):
Explain why the final value of the test is different than the starting value.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize):
Leave a FIXME for future generations.
* TestWebKitAPI/mac/mainMac.mm:
(main):
Override overlay scrollbar preferences in the UI process, so it affects all tests.
* TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
This test is also affected by using non-overlay scrollbars; we now have less space, so take up more pages.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (262799 => 262800)
--- trunk/Tools/ChangeLog 2020-06-09 18:38:17 UTC (rev 262799)
+++ trunk/Tools/ChangeLog 2020-06-09 18:46:20 UTC (rev 262800)
@@ -1,3 +1,39 @@
+2020-06-09 Tim Horton <[email protected]>
+
+ WebKit.ShrinkToFit is failing on some bots
+ https://bugs.webkit.org/show_bug.cgi?id=212932
+ <rdar://problem/60972407>
+
+ Reviewed by Simon Fraser.
+
+ TestWebKitAPI was failing to stabilize the overlay scrollbar preference,
+ because the only stabilization attempt was in the injected bundle
+ initialization code, and most tests (including ShrinkToFit) do not have
+ an injected bundle.
+
+ Because this preference is manually propagated to the Web Content process,
+ we can set the default in the volatile domain in the UI process at startup.
+
+ We can't move other preferences yet, because they are not manually propagated,
+ and WebKit's NSUserDefault synchronization mechanism ignores defaults in the
+ volatile domain (and the initial preference load reads from disk, not
+ from the UI process, so it wouldn't find them anyway).
+
+ * TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm:
+ (TEST):
+ Explain why the final value of the test is different than the starting value.
+
+ * TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
+ (TestWebKitAPI::InjectedBundleController::platformInitialize):
+ Leave a FIXME for future generations.
+
+ * TestWebKitAPI/mac/mainMac.mm:
+ (main):
+ Override overlay scrollbar preferences in the UI process, so it affects all tests.
+
+ * TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
+ This test is also affected by using non-overlay scrollbars; we now have less space, so take up more pages.
+
2020-06-09 Youenn Fablet <[email protected]>
BaseAudioSharedUnit should unmute its clients in case of suspension even if not having any audio unit
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp (262799 => 262800)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp 2020-06-09 18:38:17 UTC (rev 262799)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp 2020-06-09 18:46:20 UTC (rev 262800)
@@ -42,7 +42,7 @@
static const unsigned pageLength = 100;
static const unsigned pageGap = 100;
-static const unsigned expectedPageCount = 45;
+static const unsigned expectedPageCount = 49;
static void didLayout(WKPageRef page, WKPageRenderingProgressEvents milestones, WKTypeRef, const void* clientInfo)
{
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm (262799 => 262800)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm 2020-06-09 18:38:17 UTC (rev 262799)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm 2020-06-09 18:46:20 UTC (rev 262800)
@@ -63,7 +63,8 @@
[webView _setLayoutMode:_WKLayoutModeViewSize];
[webView evaluateJavaScript:@"document.body.clientWidth" completionHandler:^(id result, NSError *error) {
- EXPECT_EQ(100, [result integerValue]);
+ // This is 85 instead of 100 because after loading a large page, we now have a scrollbar.
+ EXPECT_EQ(85, [result integerValue]);
shrinkToFitDisabledDone = true;
}];
Modified: trunk/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm (262799 => 262800)
--- trunk/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm 2020-06-09 18:38:17 UTC (rev 262799)
+++ trunk/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm 2020-06-09 18:46:20 UTC (rev 262800)
@@ -37,12 +37,13 @@
if (!argumentDomain)
argumentDomain = [[NSMutableDictionary alloc] init];
+ // FIXME: We should set these in the UI process and propagate them to the
+ // Web Content process at process launch time, because most tests do not
+ // have an injected bundle, so these do not make TestWebKitAPI behavior consistent.
NSDictionary *dict = @{
@"AppleAntiAliasingThreshold": @(4),
@"AppleFontSmoothing": @(0),
@"NSScrollAnimationEnabled": @NO,
- @"NSOverlayScrollersEnabled": @NO,
- @"AppleShowScrollBars": @"Always",
};
[argumentDomain addEntriesFromDictionary:dict];
Modified: trunk/Tools/TestWebKitAPI/mac/mainMac.mm (262799 => 262800)
--- trunk/Tools/TestWebKitAPI/mac/mainMac.mm 2020-06-09 18:38:17 UTC (rev 262799)
+++ trunk/Tools/TestWebKitAPI/mac/mainMac.mm 2020-06-09 18:46:20 UTC (rev 262800)
@@ -38,9 +38,19 @@
NSMutableDictionary *argumentDomain = [[[NSUserDefaults standardUserDefaults] volatileDomainForName:NSArgumentDomain] mutableCopy];
if (!argumentDomain)
argumentDomain = [[NSMutableDictionary alloc] init];
-
- NSDictionary *dict = @{ @"WebKitLinkedOnOrAfterEverything": @YES };
+ // CAUTION: Defaults set here are not automatically propagated to the
+ // Web Content process. Those listed below are propagated manually.
+ NSDictionary *dict = @{
+ @"WebKitLinkedOnOrAfterEverything": @YES,
+
+ // FIXME: We should switch these defaults to use overlay
+ // scrollbars, since they are the default on the platform,
+ // but a variety of tests will need changes.
+ @"NSOverlayScrollersEnabled": @NO,
+ @"AppleShowScrollBars": @"Always",
+ };
+
[argumentDomain addEntriesFromDictionary:dict];
[[NSUserDefaults standardUserDefaults] setVolatileDomain:argumentDomain forName:NSArgumentDomain];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes