diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js')
-rw-r--r-- | testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js b/testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js index 7a8f92b1a8..1790e5632d 100644 --- a/testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js +++ b/testing/web-platform/mozilla/tests/webgpu/common/internal/websocket_logger.js @@ -1,19 +1,24 @@ /** * AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts -**/ /** +**/import { globalTestConfig } from '../framework/test_config.js'; /** * - 'uninitialized' means we haven't tried to connect yet * - Promise means it's pending * - 'failed' means it failed (this is the most common case, where the logger isn't running) * - WebSocket means it succeeded - */let connection = 'uninitialized'; + */ +let connection = +'uninitialized'; /** - * Log a string to a websocket at `localhost:59497`. See `tools/websocket-logger`. + * If the logToWebSocket option is enabled (?log_to_web_socket=1 in browser, + * --log-to-web-socket on command line, or enable it by default in options.ts), + * log a string to a websocket at `localhost:59497`. See `tools/websocket-logger`. * - * This does nothing if a connection couldn't be established on the first call. + * This does nothing if a logToWebSocket is not enabled, or if a connection + * couldn't be established on the first call. */ -export function logToWebsocket(msg) { - if (connection === 'failed') { +export function logToWebSocket(msg) { + if (!globalTestConfig.logToWebSocket || connection === 'failed') { return; } |