2 <title>Test ImageBitmap : StructuredClone main window to main window
</title>
4 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
5 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
7 <script src=
"imagebitmap_structuredclone_utils.js"></script>
8 <script type=
"text/javascript">
10 window
.onmessage = function(event
) {
11 compareImageBitmapWithImageElement(event
.data
.bitmap1
, gImage1
);
12 compareImageBitmapWithImageElement(event
.data
.bitmap2
, gImage2
);
13 compareImageBitmapWithImageData(event
.data
.bitmap3
, gImageData
, "Check preserving alpha");
18 prepareImageBitmaps().then(function(){
19 window
.postMessage({"bitmap1":gImageBitmap1
, "bitmap2":gImageBitmap2
, "bitmap3":gImageBitmap3
}, "*");
23 SimpleTest
.waitForExplicitFinish();
24 addLoadEvent(runTests
);