summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 00:50:19 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-17 00:50:19 +0000
commitbc3847a1ba39db7adec20aa9e0565f6e868e8480 (patch)
tree572eb2450ffd1bcee7f1932974f04de80c179e90 /cc/test
parenteff7a36630d6c8f86921dff9128c8be47d7c5021 (diff)
downloadchromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.zip
chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.gz
chromium_src-bc3847a1ba39db7adec20aa9e0565f6e868e8480.tar.bz2
cc: Switch to Chromium DCHECKs LOGs
We can't compile-guard code and use DCHECK since it can be enabled at runtime. This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; R=enne,jamesr Review URL: https://chromiumcodereview.appspot.com/11048044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_web_compositor_output_surface.h3
-rw-r--r--cc/test/fake_web_compositor_software_output_device.h3
-rw-r--r--cc/test/scheduler_test_common.cc4
-rw-r--r--cc/test/scheduler_test_common.h4
4 files changed, 9 insertions, 5 deletions
diff --git a/cc/test/fake_web_compositor_output_surface.h b/cc/test/fake_web_compositor_output_surface.h
index 2d3128c..fb4f314 100644
--- a/cc/test/fake_web_compositor_output_surface.h
+++ b/cc/test/fake_web_compositor_output_surface.h
@@ -5,6 +5,7 @@
#ifndef FakeWebCompositorOutputSurface_h
#define FakeWebCompositorOutputSurface_h
+#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "cc/test/fake_web_compositor_software_output_device.h"
#include <public/WebCompositorOutputSurface.h>
@@ -30,7 +31,7 @@ public:
{
if (!m_context3D)
return true;
- ASSERT(client);
+ DCHECK(client);
if (!m_context3D->makeContextCurrent())
return false;
m_client = client;
diff --git a/cc/test/fake_web_compositor_software_output_device.h b/cc/test/fake_web_compositor_software_output_device.h
index 356833b..b71adee 100644
--- a/cc/test/fake_web_compositor_software_output_device.h
+++ b/cc/test/fake_web_compositor_software_output_device.h
@@ -5,6 +5,7 @@
#ifndef FakeWebCompositorSoftwareOutputDevice_h
#define FakeWebCompositorSoftwareOutputDevice_h
+#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/skia/include/core/SkDevice.h"
#include <public/WebCompositorSoftwareOutputDevice.h>
@@ -17,7 +18,7 @@ class FakeWebCompositorSoftwareOutputDevice : public WebCompositorSoftwareOutput
public:
virtual WebImage* lock(bool forWrite) OVERRIDE
{
- ASSERT(m_device.get());
+ DCHECK(m_device.get());
m_image = m_device->accessBitmap(forWrite);
return &m_image;
}
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index 3e58f36..e956b5d 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -6,6 +6,8 @@
#include "cc/test/scheduler_test_common.h"
+#include "base/logging.h"
+
namespace WebKitTests {
void FakeCCTimeSourceClient::onTimerTick()
@@ -24,7 +26,7 @@ FakeCCThread::~FakeCCThread()
void FakeCCThread::postTask(PassOwnPtr<Task>)
{
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
void FakeCCThread::postDelayedTask(PassOwnPtr<Task> task, long long delay)
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index 2f6660b..3b73d0d 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -46,7 +46,7 @@ public:
bool hasPendingTask() const { return m_pendingTask; }
void runPendingTask()
{
- ASSERT(m_pendingTask);
+ ASSERT_TRUE(m_pendingTask);
OwnPtr<Task> task = m_pendingTask.release();
task->performTask();
}
@@ -87,7 +87,7 @@ public:
void tick()
{
- ASSERT(m_active);
+ ASSERT_TRUE(m_active);
if (m_client)
m_client->onTimerTick();
}