chromium/ui/views/actions/action_view_controller_unittest.cc

// Copyright 2023 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/views/actions/action_view_controller.h"

#include <memory>
#include <utility>

#include "base/memory/raw_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/actions/actions.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/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/events/types/event_type.h"
#include "ui/gfx/geometry/point.h"
#include "ui/views/actions/action_view_interface.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"

namespace {

DEFINE_UI_CLASS_PROPERTY_KEY()

// More specific functionalities are tested for each individual
// ActionViewInterface.
class TestButtonActionViewInterface : public views::ButtonActionViewInterface {};

class TestActionButton : public views::Button {};

BEGIN_METADATA()

const std::u16string kActionTextDisabled =;
const std::u16string kActionTextEnabled =;
constexpr int kTestActionIdDisabled =;
constexpr int kTestActionIdEnabled =;

std::unique_ptr<actions::ActionItem> CreateDisabledActionItem() {}

std::unique_ptr<actions::ActionItem> CreateEnabledActionItem() {}

}  // namespace

namespace views {

ActionViewControllerTest;

// Test reassigning action item.
TEST_F(ActionViewControllerTest, TestReassignActionItem) {}

// Test reassigning action view.
TEST_F(ActionViewControllerTest, TestReassignActionView) {}

// Test that a destroyed view does not cause crashes when action item change
// triggered.
TEST_F(ActionViewControllerTest, TestActionViewDestroyed) {}

TEST_F(ActionViewControllerTest, TriggerAction) {}

TEST_F(ActionViewControllerTest, TestCreateActionViewRelationship) {}

TEST_F(ActionViewControllerTest, TestActionInvocationContext) {}

TEST_F(ActionViewControllerTest, TestOnViewChanged) {}

}  // namespace views