Title: [260936] trunk/LayoutTests/imported/w3c
- Revision
- 260936
- Author
- [email protected]
- Date
- 2020-04-30 01:02:16 -0700 (Thu, 30 Apr 2020)
Log Message
[WebXR] Import latest changes from webxr/resources in tests
https://bugs.webkit.org/show_bug.cgi?id=211129
Reviewed by Žan Doberšek.
The code in webxr_utils.js had some engine detecting code that was not
working, and thus was unconditionally loading Chromium-only resources when
running tests with other engines (as WebKit). I fixed it upstream in
https://github.com/web-platform-tests/wpt/pull/23200 and now I'm importing it
along with a recent fix in webxr_test_constants.js.
* web-platform-tests/webxr/resources/webxr_test_constants.js: Reverse position.
* web-platform-tests/webxr/resources/webxr_util.js:
(xr_promise_test): Properly detect browser engines.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (260935 => 260936)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-04-30 05:30:43 UTC (rev 260935)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-04-30 08:02:16 UTC (rev 260936)
@@ -1,3 +1,20 @@
+2020-04-30 Sergio Villar Senin <[email protected]>
+
+ [WebXR] Import latest changes from webxr/resources in tests
+ https://bugs.webkit.org/show_bug.cgi?id=211129
+
+ Reviewed by Žan Doberšek.
+
+ The code in webxr_utils.js had some engine detecting code that was not
+ working, and thus was unconditionally loading Chromium-only resources when
+ running tests with other engines (as WebKit). I fixed it upstream in
+ https://github.com/web-platform-tests/wpt/pull/23200 and now I'm importing it
+ along with a recent fix in webxr_test_constants.js.
+
+ * web-platform-tests/webxr/resources/webxr_test_constants.js: Reverse position.
+ * web-platform-tests/webxr/resources/webxr_util.js:
+ (xr_promise_test): Properly detect browser engines.
+
2020-04-28 Noam Rosenthal <[email protected]>
Implement FCP (first contentful paint)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_test_constants.js (260935 => 260936)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_test_constants.js 2020-04-30 05:30:43 UTC (rev 260935)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_test_constants.js 2020-04-30 08:02:16 UTC (rev 260936)
@@ -71,7 +71,7 @@
1, 1.65, -1, 1];
const VALID_FLOOR_ORIGIN = {
- position: [1.0, 1.65, -1.0],
+ position: [-1.0, -1.65, 1.0],
orientation: [0, 0, 0, 1]
};
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_util.js (260935 => 260936)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_util.js 2020-04-30 05:30:43 UTC (rev 260935)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/resources/webxr_util.js 2020-04-30 08:02:16 UTC (rev 260936)
@@ -10,6 +10,8 @@
// Debugging message helper, by default does nothing. Implementations can
// override this.
var xr_debug = function(name, msg) {}
+var isChromiumBased = 'MojoInterfaceInterceptor' in self;
+var isWebKitBased = 'internals' in self && 'xrTest' in internals;
function xr_promise_test(name, func, properties) {
promise_test(async (t) => {
@@ -16,13 +18,13 @@
// Perform any required test setup:
xr_debug(name, 'setup');
- if (window.XRTest === undefined) {
+ if (isChromiumBased) {
// Chrome setup
await loadChromiumResources;
xr_debug = navigator.xr.test.Debug;
}
- if (self.internals && internals.xrTest && navigator.xr) {
+ if (isWebKitBased) {
// WebKit setup
await setupWebKitWebXRTestAPI;
}
@@ -161,7 +163,7 @@
// Code for loading test API in Chromium.
let loadChromiumResources = Promise.resolve().then(() => {
- if (!('MojoInterfaceInterceptor' in self)) {
+ if (!isChromiumBased) {
// Do nothing on non-Chromium-based browsers or when the Mojo bindings are
// not present in the global namespace.
return;
@@ -206,7 +208,7 @@
});
let setupWebKitWebXRTestAPI = Promise.resolve().then(() => {
- if (!self.internals) {
+ if (!isWebKitBased) {
// Do nothing on non-WebKit-based browsers.
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes