File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
src/webgpu/api/validation/state/device_lost Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,6 @@ g.test('mapping,mapAsync')
191
191
Tests behavior of mapAsync'd buffers when destroying the device.
192
192
- Various usages
193
193
- Wait for .lost or not
194
-
195
- TODO(https://github.com/gpuweb/gpuweb/issues/5101): Test which error we got at [1].
196
194
`
197
195
)
198
196
. params ( u =>
@@ -227,21 +225,7 @@ TODO(https://github.com/gpuweb/gpuweb/issues/5101): Test which error we got at [
227
225
// But unmap just in case, to reset state before continuing.
228
226
b . unmap ( ) ;
229
227
230
- // Check that mapping after destroy fails.
231
- // Also check that if mapAsync fails validation, it still produces an OperationError.
232
- try {
233
- await b . mapAsync ( mode ) ;
234
- t . expect ( false , 'bAsync mapAsync after destroy 1 should reject' ) ;
235
- } catch ( ex ) {
236
- if ( mode ) {
237
- // The mapAsync call is valid except for the fact that the device is lost.
238
- t . expect ( ex instanceof DOMException && ex . name === 'AbortError' ) ;
239
- } else {
240
- // The mapAsync call is also invalid for other reasons.
241
- // [1] Test which error type we got. (And maybe switch to shouldReject().)
242
- t . expect ( ex instanceof DOMException ) ;
243
- }
244
- }
228
+ // Check that mapping after destroy fails with AbortError.
245
229
const mapPromise = b . mapAsync ( mode ) ;
246
230
t . shouldReject ( 'AbortError' , mapPromise ) ;
247
231
await mapPromise . catch ( ( ) => { } ) ;
You can’t perform that action at this time.
0 commit comments