Title: [291578] trunk
Revision
291578
Author
mmaxfi...@apple.com
Date
2022-03-21 13:44:52 -0700 (Mon, 21 Mar 2022)

Log Message

[WebGPU] Set the WebGPU WKPreference to true in layout tests
https://bugs.webkit.org/show_bug.cgi?id=238130

Reviewed by Sam Weinig.

Tools:

WebGPU isn't ready yet to show up in any Safari menus, so rather than just marking it as an experimental feature,
this patch just enables the preference in DumpRenderTree and WebKitTestRunner.

This doesn't require a linker change, because all of the WebGPU calls are already behind HAS(WEBGPU_IMPLEMENTATION).
Therefore, the immediate behavior change of this patch is that the IDL types are exposed in layout tests, but calling
WebGPU functions in layout tests will return undefined. When we finally link WebCore with WebGPU, then these
functions will automatically start working in layout tests. Outside of layout tests, the IDL types are still not
present, and so therefore the WebGPU functions cannot be called because they are not visible from script.

* DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):

LayoutTests:

* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (291577 => 291578)


--- trunk/LayoutTests/ChangeLog	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/LayoutTests/ChangeLog	2022-03-21 20:44:52 UTC (rev 291578)
@@ -1,3 +1,13 @@
+2022-03-21  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [WebGPU] Set the WebGPU WKPreference to true in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=238130
+
+        Reviewed by Sam Weinig.
+
+        * platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
+        * platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
+
 2022-03-21  Tyler Wilcock  <tyle...@apple.com>
 
         AX: Include display: contents elements in the AX tree

Modified: trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt (291577 => 291578)


--- trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt	2022-03-21 20:44:52 UTC (rev 291578)
@@ -5,6 +5,7 @@
 navigator.appVersion is OK
 navigator.cookieEnabled is OK
 navigator.getStorageUpdates() is OK
+navigator.gpu is OK
 navigator.hardwareConcurrency is OK
 navigator.javaEnabled() is OK
 navigator.language is OK
@@ -32,6 +33,7 @@
 navigator.appVersion is OK
 navigator.cookieEnabled is OK
 navigator.getStorageUpdates() is OK
+navigator.gpu is OK
 navigator.hardwareConcurrency is OK
 navigator.javaEnabled() is OK
 navigator.language is OK

Modified: trunk/LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt (291577 => 291578)


--- trunk/LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt	2022-03-21 20:44:52 UTC (rev 291578)
@@ -9,6 +9,7 @@
 navigator.cookieEnabled is OK
 navigator.credentials is OK
 navigator.getStorageUpdates() is OK
+navigator.gpu is OK
 navigator.hardwareConcurrency is OK
 navigator.isLoggedIn() is OK
 navigator.javaEnabled() is OK
@@ -46,6 +47,7 @@
 navigator.cookieEnabled is OK
 navigator.credentials is OK
 navigator.getStorageUpdates() is OK
+navigator.gpu is OK
 navigator.hardwareConcurrency is OK
 navigator.isLoggedIn() is OK
 navigator.javaEnabled() is OK

Modified: trunk/Tools/ChangeLog (291577 => 291578)


--- trunk/Tools/ChangeLog	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/Tools/ChangeLog	2022-03-21 20:44:52 UTC (rev 291578)
@@ -1,5 +1,26 @@
 2022-03-21  Myles C. Maxfield  <mmaxfi...@apple.com>
 
+        [WebGPU] Set the WebGPU WKPreference to true in layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=238130
+
+        Reviewed by Sam Weinig.
+
+        WebGPU isn't ready yet to show up in any Safari menus, so rather than just marking it as an experimental feature,
+        this patch just enables the preference in DumpRenderTree and WebKitTestRunner.
+
+        This doesn't require a linker change, because all of the WebGPU calls are already behind HAS(WEBGPU_IMPLEMENTATION).
+        Therefore, the immediate behavior change of this patch is that the IDL types are exposed in layout tests, but calling
+        WebGPU functions in layout tests will return undefined. When we finally link WebCore with WebGPU, then these
+        functions will automatically start working in layout tests. Outside of layout tests, the IDL types are still not
+        present, and so therefore the WebGPU functions cannot be called because they are not visible from script.
+
+        * DumpRenderTree/TestOptions.cpp:
+        (WTR::TestOptions::defaults):
+        * WebKitTestRunner/TestOptions.cpp:
+        (WTR::TestOptions::defaults):
+
+2022-03-21  Myles C. Maxfield  <mmaxfi...@apple.com>
+
         [WebGPU] Add a build-webgpu script
         https://bugs.webkit.org/show_bug.cgi?id=238040
 

Modified: trunk/Tools/DumpRenderTree/TestOptions.cpp (291577 => 291578)


--- trunk/Tools/DumpRenderTree/TestOptions.cpp	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/Tools/DumpRenderTree/TestOptions.cpp	2022-03-21 20:44:52 UTC (rev 291578)
@@ -102,6 +102,7 @@
             { "TextAutosizingEnabled", false },
             { "UsesBackForwardCache", false },
             { "WebAudioEnabled", true },
+            { "WebGPU", true },
             { "WebSQLEnabled", true },
             { "XSSAuditorEnabled", false },
 

Modified: trunk/Tools/WebKitTestRunner/TestOptions.cpp (291577 => 291578)


--- trunk/Tools/WebKitTestRunner/TestOptions.cpp	2022-03-21 19:57:19 UTC (rev 291577)
+++ trunk/Tools/WebKitTestRunner/TestOptions.cpp	2022-03-21 20:44:52 UTC (rev 291578)
@@ -128,6 +128,7 @@
             { "TextAutosizingUsesIdempotentMode", false },
             { "UsesBackForwardCache", false },
             { "WebAuthenticationEnabled", true },
+            { "WebGPU", true },
             { "WebRTCRemoteVideoFrameEnabled", true },
             { "WebRTCMDNSICECandidatesEnabled", false },
             { "XSSAuditorEnabled", false },
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to