blob: 4fa88d53ddf68f377242bba18966b07d4e0d113c [file] [log] [blame]
Ensure correct behavior of createImageBitmap for invalid inputs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Rejected as expected: undefined
PASS reason instanceof Error is true
TypeError: Failed to execute 'createImageBitmap' on 'Window': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or Blob or ImageData or ImageBitmap or OffscreenCanvas)'
PASS Rejected as expected: null
PASS reason instanceof Error is true
TypeError: Failed to execute 'createImageBitmap' on 'Window': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or Blob or ImageData or ImageBitmap or OffscreenCanvas)'
PASS Rejected as expected: empty image
PASS reason instanceof Error is true
InvalidStateError: Failed to execute 'createImageBitmap' on 'Window': No image can be retrieved from the provided element.
PASS Rejected as expected: empty video
PASS reason instanceof Error is true
InvalidStateError: Failed to execute 'createImageBitmap' on 'Window': The provided element has not retrieved data.
PASS Rejected as expected: image / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: image / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: video / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: video / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: canvas / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: canvas / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: canvas imagedata / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: canvas imagedata / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: image bitmap / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: image bitmap / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: blob / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source height provided is 0.
PASS Rejected as expected: blob / invalid range
PASS reason instanceof Error is true
IndexSizeError: Failed to execute 'createImageBitmap' on 'Window': The source width provided is 0.
PASS Rejected as expected: invalid blob
PASS reason instanceof Error is true
InvalidStateError: The source image cannot be decoded.
PASS Rejected as expected: invalid canvas
null
PASS Rejected as expected: cropRect too big
null
PASS successfullyParsed is true
TEST COMPLETE