Skip to content

Commit a27a699

Browse files
Justin KoblerCQ Bot
Justin Kobler
authored and
CQ Bot
committed
Revert "[Honeydew][ui] e2e tests should temporarily ignore pixel alpha values"
This reverts commit c061093. Reason for revert: Ignoring pixel alpha values turns out to not be sufficient when comparing two screenshots with the same content but differing opacity. A more comprehensive solution is needed. Original change's description: > [Honeydew][ui] e2e tests should temporarily ignore pixel alpha values > > With the introduction of opacity-based brightness, e2e tests must ignore pixel alpha values to avoid failures caused by auto-brightness changing image opacity. Opacity-based brightness is only a temporary solution until the backlight driver becomes available, at which point we will revert this change back. > > Bug: b/397960210 > Change-Id: Ia230c7555068cc34156aabcede45c50807999a11 > Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1229144 > Reviewed-by: Jianpeng Chao <[email protected]> > Commit-Queue: Auto-Submit <[email protected]> > Fuchsia-Auto-Submit: Justin Kobler <[email protected]> Bug: b/397960210 Change-Id: Id6127f86ccd910cf759f30e9ddd2b675d8f7379f Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1236286 Fuchsia-Auto-Submit: Justin Kobler <[email protected]> Reviewed-by: Jianpeng Chao <[email protected]> Reviewed-by: RubberStamper 🤖 <[email protected]> Commit-Queue: Auto-Submit <[email protected]>
1 parent 4fbe60f commit a27a699

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/testing/end_to_end/honeydew/honeydew/affordances/ui/screenshot/tests/unit_tests/types_test.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ def test_pixel_similarity_different_sized_images(self) -> None:
282282
param(
283283
pixels1=[WHITE, RED, TRANSPARENT, GREEN],
284284
pixels2=[RED, WHITE, BLUE, BLACK],
285-
# TODO(b/399391948): Temporarily expect 0.75 similarity while we ignore pixel alpha
286-
# values. When we eventually revert this, expected_similarity will return to 0.5.
287-
expected_similarity=0.75,
285+
expected_similarity=0.5,
288286
),
289287
param(
290288
pixels1=[RED, RED, WHITE, WHITE],

src/testing/end_to_end/honeydew/honeydew/affordances/ui/screenshot/types.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ def _get_pixel_at_offset(self, offset: int) -> ui_types.Pixel:
221221
red=self.data[offset + 0],
222222
green=self.data[offset + 1],
223223
blue=self.data[offset + 2],
224-
# TODO(b/399391948): Ignore pixel alpha values until we remove opacity-based brightness.
225-
alpha=255,
224+
alpha=self.data[offset + 3],
226225
)
227226

228227
def _pixel_count(self) -> int:

0 commit comments

Comments
 (0)