From bc0c13ac3b61c834a4a684b1e341055495a12bce Mon Sep 17 00:00:00 2001 From: Amelia Magee Date: Wed, 11 Sep 2024 02:13:44 +0100 Subject: [PATCH] Update favicon test to investigate runner sandbox differences --- tests/js/web/Notifications/FaviconEditorTest.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tests/js/web/Notifications/FaviconEditorTest.js b/tests/js/web/Notifications/FaviconEditorTest.js index ead99ab76f..caac27f6b8 100644 --- a/tests/js/web/Notifications/FaviconEditorTest.js +++ b/tests/js/web/Notifications/FaviconEditorTest.js @@ -145,21 +145,7 @@ describe('FaviconEditor', () => { faviconEditor = new FaviconEditor($root[0]); faviconEditor.init(); - // Override serializer to return raw image data, we cannot use the default - // canvas.toDataURL(...) here as the png compression is different when - // in the browser / headless test environments - faviconEditor.setSerializer((canvas, ctx) => { - const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); - const debugCvs = document.createElement('canvas'); - const debugCtx = debugCvs.getContext('2d'); - - debugCtx.width = canvas.width; - debugCtx.height = canvas.height; - debugCtx.putImageData(imageData, 0, 0); - actual = debugCvs.toDataURL('image/png'); - - return [...imageData.data]; - }); + canvas.toDataURL('image/png'); faviconEditor.addCircleNotification('red', 5) .then((data) => {