Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: extensions/browser/image_util_unittest.cc

Issue 782693002: Ensure there are always nice icons for bookmark apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac compile Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/image_util.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/image_util_unittest.cc
diff --git a/extensions/browser/image_util_unittest.cc b/extensions/browser/image_util_unittest.cc
deleted file mode 100644
index 5dd0cee3a410de57388e07cb1af4e48690239193..0000000000000000000000000000000000000000
--- a/extensions/browser/image_util_unittest.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-
-#include "extensions/browser/image_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/skia/include/core/SkColor.h"
-
-namespace extensions {
-
-void RunPassTest(const std::string& css_string, SkColor expected_result) {
- SkColor color = 0;
- EXPECT_TRUE(image_util::ParseCSSColorString(css_string, &color));
- EXPECT_EQ(color, expected_result);
-}
-
-void RunFailTest(const std::string& css_string) {
- SkColor color = 0;
- EXPECT_FALSE(image_util::ParseCSSColorString(css_string, &color));
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundNormalCSS) {
- RunPassTest("#34006A", SkColorSetARGB(0xFF, 0x34, 0, 0x6A));
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundShortCSS) {
- RunPassTest("#A1E", SkColorSetARGB(0xFF, 0xAA, 0x11, 0xEE));
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundCSSNoHash) {
- RunFailTest("11FF22");
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundCSSTooShort) {
- RunFailTest("#FF22");
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundCSSTooLong) {
- RunFailTest("#FF22128");
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundCSSInvalid) {
- RunFailTest("#-22128");
-}
-
-TEST(ImageUtilTest, ChangeBadgeBackgroundCSSInvalidWithPlus) {
- RunFailTest("#+22128");
-}
-
-} // namespace extensions
« no previous file with comments | « extensions/browser/image_util.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698