chromium/ui/base/metadata/metadata_unittest.cc

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

#include <string>

#include "base/callback_list.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "ui/base/class_property.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/metadata/metadata_types.h"
#include "ui/base/metadata/metadata_utils.h"
#include "ui/gfx/geometry/insets.h"

UM;

class MetadataTest : public PlatformTest {};

// Base class in which a simple hierarchy is created for testing metadata
// iteration across class types.
class MetadataTestBaseClass : public ui::metadata::MetaDataProvider,
                              public ui::PropertyHandler {};

BEGIN_METADATA_BASE()

// Descendent class in the simple hierarchy. The inherited properties are
// visible within the metadata.
class MetadataTestClass : public MetadataTestBaseClass {};

BEGIN_METADATA()

// Test view to which class properties are attached.
class ClassPropertyMetaDataTestClass : public MetadataTestBaseClass {};

// Test view which doesn't have metadata attached.
struct MetadataTestClassNoMetadata : public MetadataTestBaseClass {};

DEFINE_UI_CLASS_PROPERTY_KEY()
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY()
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY()
DEFINE_UI_CLASS_PROPERTY_KEY()
DEFINE_UI_CLASS_PROPERTY_KEY()
DEFINE_UI_CLASS_PROPERTY_TYPE()

BEGIN_METADATA()

TEST_F(MetadataTest, TestFloatMetadataPropertyAccess) {}

TEST_F(MetadataTest, TestFloatPropertyChangedCallback) {}

TEST_F(MetadataTest, TestMetaDataParentClassTracking) {}

TEST_F(MetadataTest, TestMetaDataFindParentClassMember) {}

TEST_F(MetadataTest, TestMetaDataMemberIterator) {}

TEST_F(MetadataTest, TestTypeCacheContainsTestClass) {}

TEST_F(MetadataTest, TestMetaDataFile) {}

TEST_F(MetadataTest, TestClassPropertyMetaData) {}

TEST_F(MetadataTest, TestHasMetaData) {}