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

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

Issue 1486663002: Expose ImageBitmap to (Window,Worker) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More on updating layout test results Created 4 years, 11 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 data in workers.'); 5 description('Test createImageBitmap with data in workers.');
6 6
7 var bitmapWidth;
8 var bitmapHeight;
9
7 self.addEventListener('message', function(e) { 10 self.addEventListener('message', function(e) {
8 createImageBitmap(e.data).then(function() { 11 createImageBitmap(e.data).then(function(imageBitmap) {
9 testPassed('Promise fulfilled.'); 12 testPassed('Promise fulfilled.');
13 bitmapWidth = imageBitmap.width;
14 bitmapHeight = imageBitmap.height;
15 shouldBe("bitmapWidth", "50");
16 shouldBe("bitmapHeight", "50");
10 finishJSTest(); 17 finishJSTest();
11 }, function() { 18 }, function() {
12 testFailed('Promise rejected.'); 19 testFailed('Promise rejected.');
13 finishJSTest(); 20 finishJSTest();
14 }); 21 });
15 }); 22 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698