Commit 54b0f2f9 authored by Findit's avatar Findit

Revert "WebApp: Check pixel at the center of the generated icon."

This reverts commit 5a0adcbe.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 711143 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzVhMGFkY2JlOGYxZGE2OTlmMDBhMDljODYzMjJhNTU4MDAyZjBhMDYM

Sample Failed Build: https://ci.chromium.org/b/8898108792770719008

Sample Failed Step: unit_tests

Original change's description:
> WebApp: Check pixel at the center of the generated icon.
> 
> We generate an icon placeholder using a letter with some solid
> background color.
> 
> Let the test check if letter_color is actually presented in the icon.
> 
> This is a follow up test enhancement for the previous CL:
> https://chromium-review.googlesource.com/c/chromium/src/+/1888234
> 
> Bug: 1019102
> Change-Id: I10e196926dff78032dcd8f00e93e24715d1be913
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891816
> Commit-Queue: Alexey Baskakov <loyso@chromium.org>
> Reviewed-by: Alan Cutter <alancutter@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#711143}


Change-Id: I7e555cad166437e3d004e77526dad06656d2a2b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1019102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892127
Cr-Commit-Position: refs/heads/master@{#711154}
parent 65c8f2ec
......@@ -369,7 +369,6 @@ TEST_F(WebAppIconGeneratorTest, GenerateIconLetterFromUrl) {
TEST_F(WebAppIconGeneratorTest, GenerateIcons) {
std::set<int> sizes = SizesToGenerate();
const SkColor bg_color = SK_ColorCYAN;
const SkColor letter_color = color_utils::GetColorWithMaxContrast(bg_color);
// This is Unicode "Black Large Circle" U+2B24 character encoded as UTF8.
// Guarantees that there is some letter_color area at the center of the
......@@ -394,15 +393,7 @@ TEST_F(WebAppIconGeneratorTest, GenerateIcons) {
// We don't check corner colors here: the icon is rounded by border_radius.
EXPECT_EQ(bg_color, icon_info.data.getColor(border_radius * 2, center_y));
EXPECT_EQ(bg_color, icon_info.data.getColor(center_x, border_radius * 2));
// Only for large icons with a sharp letter: Peek a pixel at the center of
// icon.
if (icon_info.width >= icon_size::k256) {
SkColor center_color = icon_info.data.getColor(center_x, center_y);
SCOPED_TRACE(letter_color);
SCOPED_TRACE(center_color);
EXPECT_TRUE(AreColorsEqual(letter_color, center_color, /*threshold=*/50));
}
// TODO(loyso): Peek a pixel at the center of icon and check the color.
sizes.erase(icon_info.width);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment