mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-16 18:31:50 +01:00
Add workaround for Firefox PNG rounding bug
This commit is contained in:
parent
8b8201fd73
commit
c6c2661121
@ -128,8 +128,15 @@ describe('TightPng Decoder', function () {
|
||||
0x00, 0xff, 0x00, 255, 0x00, 0xff, 0x00, 255, 0xff, 0x00, 0x00, 255, 0xff, 0x00, 0x00, 255
|
||||
]);
|
||||
|
||||
// Firefox currently has some very odd rounding bug:
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1667747
|
||||
function almost(a, b) {
|
||||
let diff = Math.abs(a - b);
|
||||
return diff < 30;
|
||||
}
|
||||
|
||||
display.onflush = () => {
|
||||
expect(display).to.have.displayed(targetData);
|
||||
expect(display).to.have.displayed(targetData, almost);
|
||||
done();
|
||||
};
|
||||
display.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user