chromium/ui/base/class_property_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/base/class_property.h"

#include <limits.h>

#include <string>
#include <utility>
#include <vector>

#include "base/compiler_specific.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

DEFINE_UI_CLASS_PROPERTY_TYPE()
DEFINE_UI_CLASS_PROPERTY_TYPE()
DEFINE_UI_CLASS_PROPERTY_TYPE()

namespace {

class TestProperty {};

class TestCascadingProperty {};

void* TestProperty::last_deleted_ =;

class AssignableTestProperty {};

DEFINE_OWNED_UI_CLASS_PROPERTY_KEY()
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY()
DEFINE_CASCADING_OWNED_UI_CLASS_PROPERTY_KEY()

}  // namespace

DEFINE_UI_CLASS_PROPERTY_TYPE()
DEFINE_UI_CLASS_PROPERTY_TYPE()
DEFINE_UI_CLASS_PROPERTY_TYPE()

namespace ui {
namespace test {

namespace {

class TestPropertyHandler : public PropertyHandler {};

const int kDefaultIntValue =;
const char* kDefaultStringValue =;
const char* kTestStringValue =;
const float kDefaultFloatValue =;

DEFINE_UI_CLASS_PROPERTY_KEY()
DEFINE_UI_CLASS_PROPERTY_KEY()
DEFINE_UI_CLASS_PROPERTY_KEY()
}

TEST(PropertyTest, Property) {}

TEST(PropertyTest, OwnedProperty) {}

TEST(PropertyTest, AcquireAllPropertiesFrom) {}

TEST(PropertyTest, AssignableProperty) {}

TEST(PropertyTest, SetProperty_ForwardsParametersCorrectly) {}

TEST(PropertyTest, PropertyChangedEvent) {}

TEST(PropertyTest, CascadingProperties) {}

// TODO(kylixrd, pbos): Once all the call-sites are fixed to only use the
// unique_ptr version for owned properties, enable the following test to ensure
// that passing raw pointers for owned properties will, in fact, DCHECK.
TEST(PropertyTest, DISABLED_CheckedOwnedProperties) {}

} // namespace test
} // namespace ui