Skip to content

Add test for device.onuncapturederror #4361

@kainino0x

Description

@kainino0x

We have tests for device.addEventListener('uncapturederror') but apparently not for device.onuncapturederror, or if we do, they're not catching an issue in Safari. We should test that!

Originally posted by @mwyrzykowski in webgpu/webgpu-samples#501 (comment)

Ah looks like we were rejecting 3D compressed texture creation even when the extension was enabled, thanks for catching

@mwyrzykowski Is it firing the GPUDevice uncapturederror event? The samples are supposed to pop up a dialog if that happens.

@kainino0x it appears the related CTS tests https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,error_scope:* and https://gpuweb.github.io/cts/standalone/?q=webgpu:api,operation,uncapturederror:* are passing in WebKit as the pattern from https://www.w3.org/TR/webgpu/#example-bf3af559 works in WebKit

But the method used in the samples:

  device.onuncapturederror = (ev) => {
    fail(`Uncaptured error:\n${ev.error.message}`);
  };

does not. Replacing that with:

    device.addEventListener('uncapturederror', (ev) => {
        fail(`Uncaptured error:\n${ev.error.message}`);
    });

[works as expected].

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions