Title: [244134] trunk/Tools
- Revision
- 244134
- Author
- [email protected]
- Date
- 2019-04-10 10:46:44 -0700 (Wed, 10 Apr 2019)
Log Message
Add a way to opt into modern compatibility mode in layout tests
https://bugs.webkit.org/show_bug.cgi?id=196770
<rdar://problem/49777550>
Reviewed by Antoine Quint.
Add a new test option to enable modern compatibility mode in layout tests.
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
(WTR::TestController::enableModernCompatibilityMode):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (244133 => 244134)
--- trunk/Tools/ChangeLog 2019-04-10 17:40:21 UTC (rev 244133)
+++ trunk/Tools/ChangeLog 2019-04-10 17:46:44 UTC (rev 244134)
@@ -1,3 +1,22 @@
+2019-04-10 Wenson Hsieh <[email protected]>
+
+ Add a way to opt into modern compatibility mode in layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=196770
+ <rdar://problem/49777550>
+
+ Reviewed by Antoine Quint.
+
+ Add a new test option to enable modern compatibility mode in layout tests.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::updateTestOptionsFromTestHeader):
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestOptions.h:
+ (WTR::TestOptions::hasSameInitializationOptions const):
+ * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+ (WTR::TestController::platformCreateWebView):
+ (WTR::TestController::enableModernCompatibilityMode):
+
2019-04-10 Andy Estes <[email protected]>
Try to fix the 32-bit watchOS build.
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (244133 => 244134)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2019-04-10 17:40:21 UTC (rev 244133)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2019-04-10 17:46:44 UTC (rev 244134)
@@ -1366,6 +1366,8 @@
testOptions.contentInsetTop = std::stod(value);
else if (key == "ignoreSynchronousMessagingTimeouts")
testOptions.contextOptions.ignoreSynchronousMessagingTimeouts = parseBooleanTestHeaderValue(value);
+ else if (key == "shouldUseModernCompatibilityMode")
+ testOptions.shouldUseModernCompatibilityMode = parseBooleanTestHeaderValue(value);
pairStart = pairEnd + 1;
}
}
Modified: trunk/Tools/WebKitTestRunner/TestController.h (244133 => 244134)
--- trunk/Tools/WebKitTestRunner/TestController.h 2019-04-10 17:40:21 UTC (rev 244133)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2019-04-10 17:46:44 UTC (rev 244134)
@@ -458,6 +458,7 @@
#if PLATFORM(COCOA)
static void finishCreatingPlatformWebView(PlatformWebView*, const TestOptions&);
+ void enableModernCompatibilityMode(WKWebViewConfiguration *);
#endif
static const char* libraryPathForTesting();
Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (244133 => 244134)
--- trunk/Tools/WebKitTestRunner/TestOptions.h 2019-04-10 17:40:21 UTC (rev 244133)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h 2019-04-10 17:46:44 UTC (rev 244134)
@@ -91,6 +91,7 @@
bool enableUndoManagerAPI { false };
bool shouldHandleRunOpenPanel { true };
bool shouldPresentPopovers { true };
+ bool shouldUseModernCompatibilityMode { false };
double contentInsetTop { 0 };
@@ -140,7 +141,8 @@
|| enableUndoManagerAPI != options.enableUndoManagerAPI
|| shouldHandleRunOpenPanel != options.shouldHandleRunOpenPanel
|| shouldPresentPopovers != options.shouldPresentPopovers
- || contentInsetTop != options.contentInsetTop)
+ || contentInsetTop != options.contentInsetTop
+ || shouldUseModernCompatibilityMode != options.shouldUseModernCompatibilityMode)
return false;
if (!contextOptions.hasSameInitializationOptions(options.contextOptions))
Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (244133 => 244134)
--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2019-04-10 17:40:21 UTC (rev 244133)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm 2019-04-10 17:46:44 UTC (rev 244134)
@@ -159,6 +159,9 @@
if (options.enableUndoManagerAPI)
[copiedConfiguration _setUndoManagerAPIEnabled:YES];
+ if (options.shouldUseModernCompatibilityMode)
+ enableModernCompatibilityMode(copiedConfiguration.get());
+
if (options.applicationManifest.length()) {
auto manifestPath = [NSString stringWithUTF8String:options.applicationManifest.c_str()];
NSString *text = [NSString stringWithContentsOfFile:manifestPath usedEncoding:nullptr error:nullptr];
@@ -402,4 +405,14 @@
return m_mainWebView->platformView()._mediaCaptureState != _WKMediaCaptureStateNone;
}
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/TestControllerCocoaAdditions.mm>
+#else
+
+void TestController::enableModernCompatibilityMode(WKWebViewConfiguration *)
+{
+}
+
+#endif
+
} // namespace WTR
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes