Commit 3d7676fb authored by Armando Miraglia's avatar Armando Miraglia Committed by Commit Bot

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

This reverts commit 65bc021c.

Reason for revert: This is breaking Mac too (https://ci.chromium.org/p/chromium/builders/ci/Mac10.11%20Tests/44138)

Original change's description:
> Reland "WebApp: Check pixel at the center of the generated icon."
> 
> This is a reland of 5a0adcbe
> 
> Let's exclude Win platform for now. This is a useful finding which
> requires investigation.
> 
> 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}
> 
> Bug: 1019102
> Change-Id: I2d01c2a9f5eb94107a4dfc4fea041bdb18871fc3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892651
> Commit-Queue: Alexey Baskakov <loyso@chromium.org>
> Reviewed-by: Alan Cutter <alancutter@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#711164}

TBR=alancutter@chromium.org,loyso@chromium.org

Change-Id: I99a31ce879eed7ef5e79d6e1a68e119ff2e8f153
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1019102
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893275Reviewed-by: default avatarArmando Miraglia <armax@chromium.org>
Commit-Queue: Armando Miraglia <armax@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711221}
parent 57e61893
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/test/task_environment.h" #include "base/test/task_environment.h"
#include "build/build_config.h"
#include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h"
#include "chrome/common/web_application_info.h" #include "chrome/common/web_application_info.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -394,21 +393,7 @@ TEST_F(WebAppIconGeneratorTest, GenerateIcons) { ...@@ -394,21 +393,7 @@ TEST_F(WebAppIconGeneratorTest, GenerateIcons) {
// We don't check corner colors here: the icon is rounded by border_radius. // 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(border_radius * 2, center_y));
EXPECT_EQ(bg_color, icon_info.data.getColor(center_x, border_radius * 2)); EXPECT_EQ(bg_color, icon_info.data.getColor(center_x, border_radius * 2));
// TODO(loyso): Peek a pixel at the center of icon and check the color.
// Only for large icons with a sharp letter: Peek a pixel at the center of
// icon.
//
// TODO(crbug.com/1019102): Investigate if Win7 x64 doesn't generate
// unicode characters in our GeneratedIconImageSource implementation.
#if !defined(OS_WIN)
const SkColor letter_color = color_utils::GetColorWithMaxContrast(bg_color);
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));
}
#endif // !defined(OS_WIN)
sizes.erase(icon_info.width); 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