blob: 0c93d8d87653b27c71191bd8bce89f178327f044 [file] [log] [blame]
// Copyright 2015 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 "platform/graphics/paint/DisplayItemClient.h"
#include "platform/testing/FakeDisplayItemClient.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
namespace {
#if ENABLE(ASSERT)
TEST(DisplayItemClientTest, IsAlive)
{
EXPECT_FALSE(DisplayItemClient::isAlive(*reinterpret_cast<DisplayItemClient*>(0x12345678)));
FakeDisplayItemClient* testClient = new FakeDisplayItemClient;
EXPECT_TRUE(DisplayItemClient::isAlive(*testClient));
delete testClient;
EXPECT_FALSE(DisplayItemClient::isAlive(*testClient));
}
#endif // ENABLE(ASSERT)
} // namespace
} // namespace blink