#include "chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h"
#include <memory>
#include <utility>
#include "base/memory/weak_ptr.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/input/native_web_keyboard_event.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/site_instance.h"
#include "content/public/common/content_client.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/page/draggable_region.mojom.h"
namespace views {
namespace {
class MockHost : public WebUIContentsWrapper::Host { … };
class TestWebUIContentsWrapper
: public WebUIContentsWrapper { … };
}
namespace test {
class WebUIContentsWrapperTest : public ChromeViewsTestBase { … };
TEST_F(WebUIContentsWrapperTest, CallsHostForShowUIAndCloseUIWhenPresent) { … }
TEST_F(WebUIContentsWrapperTest, CallsShowContextMenu) { … }
TEST_F(WebUIContentsWrapperTest, NotifiesHostWhenResized) { … }
TEST_F(WebUIContentsWrapperTest, EscapeKeyClosesHost) { … }
TEST_F(WebUIContentsWrapperTest, ClosesHostOnWebContentsCrash) { … }
TEST_F(WebUIContentsWrapperTest, NotifiesHostWhenDraggableRegionsUpdated) { … }
TEST_F(WebUIContentsWrapperTest, HostIsResizedOnSetHost) { … }
}
}