Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/resources/canvas-createImageBitmap-invalid-blob-in-workers.js

Issue 1841313003: Reject promise with InvalidStateError instead of null in createImageBitmap(Blob) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 importScripts('../../../resources/js-test.js'); 1 importScripts('../../../resources/js-test.js');
2 2
3 self.jsTestIsAsync = true; 3 self.jsTestIsAsync = true;
4 4
5 description('Test createImageBitmap with invalid blobs in workers.'); 5 description('Test createImageBitmap with invalid blobs in workers.');
6 6
7 self.addEventListener('message', function(e) { 7 self.addEventListener('message', function(e) {
8 createImageBitmap(e.data).then(function() { 8 createImageBitmap(e.data).then(function() {
9 testFailed('Promise fulfuilled.'); 9 testFailed('Promise fulfuilled.');
10 finishJSTest(); 10 finishJSTest();
11 }, function() { 11 }, function(ex) {
12 testPassed('Promise rejected.'); 12 testPassed('Promise rejected: ' + ex);
13 finishJSTest(); 13 finishJSTest();
14 }); 14 });
15 }); 15 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698