chromium/ui/web_dialogs/web_dialog_delegate_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/web_dialogs/web_dialog_delegate.h"

#include "base/test/bind.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace ui {
namespace {

WebDialogDelegateTest;

class TestMessageHandler : public content::WebUIMessageHandler {};

// This test validates that:
// 1. AddWebUIMessageHandler() takes ownership of the passed-in handlers, and
// 2. GetWebUIMessageHandlers() passes ownership of the handlers back
TEST(WebDialogDelegateTest, MessageHandlerOwnershipIsPassed) {}

TEST(WebDialogDelegateTest, CallbackOnClose) {}

class DeletionTestWebDialogDelegate : public WebDialogDelegate {};

TEST(WebDialogDelegateTest, DeleteOnClose) {}

TEST(WebDialogDelegateTest, NoDeleteOnClose) {}

TEST(WebDialogDelegateTest, AcceleratorsAreHandled) {}

}  // namespace
}  // namespace ui