Drupal Association members fund grants that make connections all over the world.
While investigating why my patch for issuedid not pass, I stumbled upon a few bad tests in image.test
The tests usually check if all four corners of a test image are of the expected colours. However, only the last result is actually used in the assert call, which means that for every test, only the bottom-left corner is tested. And this corner is transparent, which means it does not even have the same problems as the other corners.
After correcting this several tests fail, either because of genuine bugs which were not tested or because of problems in these tests which were not visible until now.
The proposed patch moves the assert call inside the foreach loop that checks every corner, corrects three tests that were expecting wrong values: fuschia instead of transparent for rotation, black instead of light grey for yellow desaturation, and white instead of light grey for yellow desaturation in GIF.
The problem with GIF desaturation was due to a bug in the GD toolkit, where GIFs were desaturated without being reindexed. This bug was attributed to a problem with transparency because only the last corner was checked, while it was in fact also present on other colours (which was made visible by fixing the tests).
Therefore my patch also fixes the image_gd_desaturate() function in core/modules/system/image.gd.inc.
PASSED: [[SimpleTest]]: [MySQL] 40,877 pass(es). View
|#8||gd_tests_dont_work-1579810-8.patch||5.77 KB||Albert Volkman|
PASSED: [[SimpleTest]]: [MySQL] 39,140 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 36,798 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 36,726 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 36,679 pass(es). View