Index: cc/CCRendererGLTest.cpp |
diff --git a/cc/CCRendererGLTest.cpp b/cc/CCRendererGLTest.cpp |
index 7c848539754229da649704028fac3582962f940e..c8aa17778bc9e78a0c386978235d7c135ffbc7dc 100644 |
--- a/cc/CCRendererGLTest.cpp |
+++ b/cc/CCRendererGLTest.cpp |
@@ -43,7 +43,7 @@ public: |
int frameCount() { return m_frame; } |
void setMemoryAllocation(WebGraphicsMemoryAllocation allocation) |
{ |
- ASSERT(CCProxy::isImplThread()); |
+ DCHECK(CCProxy::isImplThread()); |
// In single threaded mode we expect this callback on main thread. |
DebugScopedSetMainThread main; |
m_memoryAllocationChangedCallback->onMemoryAllocationChanged(allocation); |
@@ -251,20 +251,18 @@ public: |
// We allow querying the shader compilation and program link status in debug mode, but not release. |
virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value) |
{ |
-#ifndef NDEBUG |
- *value = 1; |
-#else |
- ADD_FAILURE(); |
-#endif |
+ if (DCHECK_IS_ON()) |
+ *value = 1; |
+ else |
+ ADD_FAILURE(); |
} |
virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value) |
{ |
-#ifndef NDEBUG |
- *value = 1; |
-#else |
- ADD_FAILURE(); |
-#endif |
+ if (DCHECK_IS_ON()) |
+ *value = 1; |
+ else |
+ ADD_FAILURE(); |
} |
virtual WebString getString(WGC3Denum name) |
@@ -403,11 +401,10 @@ TEST(CCRendererGLTest2, opaqueBackground) |
// On DEBUG builds, render passes with opaque background clear to blue to |
// easily see regions that were not drawn on the screen. |
-#if defined(NDEBUG) |
- EXPECT_EQ(0, context->clearCount()); |
-#else |
- EXPECT_EQ(1, context->clearCount()); |
-#endif |
+ if (!DCHECK_IS_ON()) |
+ EXPECT_EQ(0, context->clearCount()); |
+ else |
+ EXPECT_EQ(1, context->clearCount()); |
} |
TEST(CCRendererGLTest2, transparentBackground) |