chromium/third_party/blink/renderer/core/html/forms/external_popup_menu_test.cc

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

#include "third_party/blink/renderer/core/html/forms/external_popup_menu.h"

#include <memory>

#include "content/test/test_blink_web_unit_test_support.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/choosers/popup_menu.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/web/web_popup_menu_info.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/forms/popup_menu.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/testing/fake_local_frame_host.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_loader_mock_factory.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"

namespace blink {

class ExternalPopupMenuDisplayNoneItemsTest : public PageTestBase {};

TEST_F(ExternalPopupMenuDisplayNoneItemsTest, PopupMenuInfoSizeTest) {}

TEST_F(ExternalPopupMenuDisplayNoneItemsTest, IndexMappingTest) {}

class ExternalPopupMenuHrElementItemsTest : public PageTestBase {};

TEST_F(ExternalPopupMenuHrElementItemsTest, PopupMenuInfoSizeTest) {}

TEST_F(ExternalPopupMenuHrElementItemsTest, IndexMappingTest) {}

class TestLocalFrameExternalPopupClient : public FakeLocalFrameHost {};

class ExternalPopupMenuTest : public PageTestBase {};

TEST_F(ExternalPopupMenuTest, PopupAccountsForVisualViewportTransform) {}

// Android doesn't use this position data and we don't adjust it for DPR there..
#ifdef OS_ANDROID
#define MAYBE_PopupAccountsForDeviceScaleFactor
#else
#define MAYBE_PopupAccountsForDeviceScaleFactor
#endif

TEST_F(ExternalPopupMenuTest, MAYBE_PopupAccountsForDeviceScaleFactor) {}

TEST_F(ExternalPopupMenuTest, DidAcceptIndex) {}

TEST_F(ExternalPopupMenuTest, DidAcceptIndices) {}

TEST_F(ExternalPopupMenuTest, DidAcceptIndicesClearSelect) {}

// Normal case: test showing a select popup, canceling/selecting an item.
TEST_F(ExternalPopupMenuTest, NormalCase) {}

// Page shows popup, then navigates away while popup showing, then select.
TEST_F(ExternalPopupMenuTest, ShowPopupThenNavigate) {}

// An empty select should not cause a crash when clicked.
// http://crbug.com/63774
TEST_F(ExternalPopupMenuTest, EmptySelect) {}

// Tests that nothing bad happen when the page removes the select when it
// changes. (http://crbug.com/61997)
TEST_F(ExternalPopupMenuTest, RemoveOnChange) {}

// crbug.com/912211
TEST_F(ExternalPopupMenuTest, RemoveFrameOnChange) {}

}  // namespace blink