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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemClientTest.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/paint/DisplayItemClient.h" 5 #include "platform/graphics/paint/DisplayItemClient.h"
6 6
7 #include "platform/testing/FakeDisplayItemClient.h" 7 #include "platform/testing/FakeDisplayItemClient.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace blink { 10 namespace blink {
11 namespace { 11 namespace {
12 12
13 #if ENABLE(ASSERT) && !defined(UNDEFINED_SANITIZER) 13 #if DCHECK_IS_ON() && !defined(UNDEFINED_SANITIZER)
14 14
15 TEST(DisplayItemClientTest, IsAlive) { 15 TEST(DisplayItemClientTest, IsAlive) {
16 EXPECT_FALSE(reinterpret_cast<DisplayItemClient*>(0x12345678)->isAlive()); 16 EXPECT_FALSE(reinterpret_cast<DisplayItemClient*>(0x12345678)->isAlive());
17 FakeDisplayItemClient* testClient = new FakeDisplayItemClient; 17 FakeDisplayItemClient* testClient = new FakeDisplayItemClient;
18 EXPECT_TRUE(testClient->isAlive()); 18 EXPECT_TRUE(testClient->isAlive());
19 delete testClient; 19 delete testClient;
20 EXPECT_FALSE(testClient->isAlive()); 20 EXPECT_FALSE(testClient->isAlive());
21 } 21 }
22 22
23 #endif // ENABLE(ASSERT) 23 #endif
24 24
25 } // namespace 25 } // namespace
26 } // namespace blink 26 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698