diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-04-09 17:11:30 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-04-09 17:14:26 +0200 |
commit | 908abb6566027d9d09fb7079738c3edcdd9ceb0a (patch) | |
tree | f16f408adc37a11dfa3fa5c0e463f881dd515d47 /tests | |
parent | dc14d314c424a8d9ddf2e8e8c98d6d663e26cf38 (diff) | |
download | qutebrowser-908abb6566027d9d09fb7079738c3edcdd9ceb0a.tar.gz qutebrowser-908abb6566027d9d09fb7079738c3edcdd9ceb0a.zip |
notifications: Fix image padding assertion
The underlying Chromium pads images so that scanlines align on 4-byte
boundaries. Thus, with an image size of e.g. 239x239, we'll have 3 bytes
of padding (239 mod 4 = 3; 240 mod 4 = 0).
Fixes #6375
Diffstat (limited to 'tests')
-rw-r--r-- | tests/end2end/data/javascript/img/padded2.png | bin | 0 -> 5633 bytes | |||
-rw-r--r-- | tests/end2end/data/javascript/notifications.html | 2 | ||||
-rw-r--r-- | tests/end2end/features/notifications.feature | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/end2end/data/javascript/img/padded2.png b/tests/end2end/data/javascript/img/padded2.png Binary files differnew file mode 100644 index 000000000..be3cff635 --- /dev/null +++ b/tests/end2end/data/javascript/img/padded2.png diff --git a/tests/end2end/data/javascript/notifications.html b/tests/end2end/data/javascript/notifications.html index db28328d5..2c4590417 100644 --- a/tests/end2end/data/javascript/notifications.html +++ b/tests/end2end/data/javascript/notifications.html @@ -101,6 +101,8 @@ <input type="button" onclick="show_image_notification('RGB', 'rgb.png')" value="Show image notification without alpha channel" id="show-image-button-noalpha"> <input type="button" onclick="show_image_notification('Big', 'big.png')" value="Show a big image notification" id="show-image-button-big"> <input type="button" onclick="show_image_notification('Padded', 'padded.png')" value="Show a padded image notification" id="show-image-button-padded"> + <input type="button" onclick="show_image_notification('Padded 2', 'padded2.png')" value="Show a padded image notification 2" +id="show-image-button-padded-2"> </div> <div> More advanced test pages: diff --git a/tests/end2end/features/notifications.feature b/tests/end2end/features/notifications.feature index 5da0c072e..08c5f725f 100644 --- a/tests/end2end/features/notifications.feature +++ b/tests/end2end/features/notifications.feature @@ -53,6 +53,12 @@ Feature: Notifications And the notification should have title "Padded" And the notification should have image dimensions 46x46 + Scenario: Notification with padded image 2 + When I run :click-element id show-image-button-padded-2 + Then the javascript message "notification shown" should be logged + And the notification should have title "Padded 2" + And the notification should have image dimensions 239x239 + Scenario: Closing notification via web When I run :click-element id show-closing-button Then the javascript message "notification shown" should be logged |