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

Unified Diff: ui/gfx/image/image_skia_unittest.cc

Issue 2923223002: Replace ENABLE_NON_THREAD_SAFE with DCHECK_IS_ON() in image_skia_unittest.cc (Closed)
Patch Set: Created 3 years, 6 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_unittest.cc
diff --git a/ui/gfx/image/image_skia_unittest.cc b/ui/gfx/image/image_skia_unittest.cc
index 2f4ef4fe16e1eeef6212986eb353a2e0f0218154..df9b42dbed32c11c4a23fe2a0af8e5d16e7b286e 100644
--- a/ui/gfx/image/image_skia_unittest.cc
+++ b/ui/gfx/image/image_skia_unittest.cc
@@ -17,14 +17,6 @@
#include "ui/gfx/image/image_skia_source.h"
#include "ui/gfx/switches.h"
-// Duplicated from base/threading/non_thread_safe.h so that we can be
-// good citizens there and undef the macro.
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
-#define ENABLE_NON_THREAD_SAFE 1
-#else
-#define ENABLE_NON_THREAD_SAFE 0
-#endif
-
namespace gfx {
namespace {
@@ -355,7 +347,7 @@ TEST_F(ImageSkiaTest, BackedBySameObjectAs) {
EXPECT_FALSE(copy.BackedBySameObjectAs(unrelated));
}
-#if ENABLE_NON_THREAD_SAFE
+#if DCHECK_IS_ON()
TEST_F(ImageSkiaTest, EmptyOnThreadTest) {
ImageSkia empty;
test::TestOnThread empty_on_thread(&empty);
@@ -481,10 +473,7 @@ TEST_F(ImageSkiaTest, SourceOnThreadTest) {
EXPECT_TRUE(image.CanRead());
EXPECT_FALSE(image.CanModify());
}
-#endif // ENABLE_NON_THREAD_SAFE
-
-// Just in case we ever get lumped together with other compilation units.
-#undef ENABLE_NON_THREAD_SAFE
+#endif // DCHECK_IS_ON()
TEST_F(ImageSkiaTest, Unscaled) {
SkBitmap bitmap;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698