chromium/components/browser_ui/widget/android/BUILD.gn

# 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.

import("//build/config/android/rules.gni")

android_library("java") {
  sources = [
    "java/src/org/chromium/components/browser_ui/widget/AlwaysDismissedDialog.java",
    "java/src/org/chromium/components/browser_ui/widget/BoundedLinearLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/BrowserUiListMenuUtils.java",
    "java/src/org/chromium/components/browser_ui/widget/CheckBoxWithDescription.java",
    "java/src/org/chromium/components/browser_ui/widget/ChromeDialog.java",
    "java/src/org/chromium/components/browser_ui/widget/ChromeTransitionDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/ClipDrawableProgressBar.java",
    "java/src/org/chromium/components/browser_ui/widget/CompositeTouchDelegate.java",
    "java/src/org/chromium/components/browser_ui/widget/ContextMenuDialog.java",
    "java/src/org/chromium/components/browser_ui/widget/CoordinatorLayoutForPointer.java",
    "java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java",
    "java/src/org/chromium/components/browser_ui/widget/DualControlLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/FadingEdgeScrollView.java",
    "java/src/org/chromium/components/browser_ui/widget/FadingShadow.java",
    "java/src/org/chromium/components/browser_ui/widget/FadingShadowView.java",
    "java/src/org/chromium/components/browser_ui/widget/FullscreenAlertDialog.java",
    "java/src/org/chromium/components/browser_ui/widget/GradientParagraphLoadingView.java",
    "java/src/org/chromium/components/browser_ui/widget/IphDialogView.java",
    "java/src/org/chromium/components/browser_ui/widget/MaterialCardViewNoShadow.java",
    "java/src/org/chromium/components/browser_ui/widget/MaterialProgressBar.java",
    "java/src/org/chromium/components/browser_ui/widget/MaterialSwitchWithText.java",
    "java/src/org/chromium/components/browser_ui/widget/MaterialSwitchWithTitleAndSummary.java",
    "java/src/org/chromium/components/browser_ui/widget/MenuOrKeyboardActionController.java",
    "java/src/org/chromium/components/browser_ui/widget/MoreProgressButton.java",
    "java/src/org/chromium/components/browser_ui/widget/NumberRollView.java",
    "java/src/org/chromium/components/browser_ui/widget/PaddedFrameLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/PromoDialog.java",
    "java/src/org/chromium/components/browser_ui/widget/PromoDialogLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescription.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButton.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditText.java",
    "java/src/org/chromium/components/browser_ui/widget/RoundedCornerImageView.java",
    "java/src/org/chromium/components/browser_ui/widget/RoundedCornerOutlineProvider.java",
    "java/src/org/chromium/components/browser_ui/widget/RoundedIconGenerator.java",
    "java/src/org/chromium/components/browser_ui/widget/SurfaceColorDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/TintedDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/TouchEventObserver.java",
    "java/src/org/chromium/components/browser_ui/widget/TouchEventProvider.java",
    "java/src/org/chromium/components/browser_ui/widget/ViewResourceFrameLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/WrappingLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/animation/CancelAwareAnimatorListener.java",
    "java/src/org/chromium/components/browser_ui/widget/animation/FocusAnimator.java",
    "java/src/org/chromium/components/browser_ui/widget/async_image/AsyncImageView.java",
    "java/src/org/chromium/components/browser_ui/widget/async_image/AutoAnimatorDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/async_image/ForegroundDrawableCompat.java",
    "java/src/org/chromium/components/browser_ui/widget/async_image/ForegroundRoundedCornerImageView.java",
    "java/src/org/chromium/components/browser_ui/widget/chips/ChipProperties.java",
    "java/src/org/chromium/components/browser_ui/widget/chips/ChipView.java",
    "java/src/org/chromium/components/browser_ui/widget/chips/ChipViewBinder.java",
    "java/src/org/chromium/components/browser_ui/widget/chips/ChipsCoordinator.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/DisplayStyleObserver.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/DisplayStyleObserverAdapter.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/HorizontalDisplayStyle.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/UiConfig.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/VerticalDisplayStyle.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/ViewResizer.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/ViewResizerUtil.java",
    "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragReorderableListAdapter.java",
    "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragReorderableRecyclerViewAdapter.java",
    "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragStateDelegate.java",
    "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragUtils.java",
    "java/src/org/chromium/components/browser_ui/widget/gesture/BackPressHandler.java",
    "java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java",
    "java/src/org/chromium/components/browser_ui/widget/highlight/PulseDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/highlight/PulseInterpolator.java",
    "java/src/org/chromium/components/browser_ui/widget/highlight/ViewHighlighter.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/ImageTile.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/ImageTileCoordinator.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/ImageTileCoordinatorFactory.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileConfig.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileCoordinatorImpl.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileListModel.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileListProperties.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileListPropertyViewBinder.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileListView.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileMediator.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileSizeSupplier.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileViewHolder.java",
    "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileViewHolderFactory.java",
    "java/src/org/chromium/components/browser_ui/widget/impression/ImpressionTracker.java",
    "java/src/org/chromium/components/browser_ui/widget/impression/OneShotImpressionListener.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardCoordinator.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardProperties.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardView.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewBinder.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimCoordinator.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimMediator.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimProperties.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimView.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimViewBinder.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/CheckableSelectableItemView.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableItemView.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableItemViewBase.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableItemViewHolder.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListLayout.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListToolbar.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListUtils.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectionDelegate.java",
    "java/src/org/chromium/components/browser_ui/widget/text/AccessibleTextView.java",
    "java/src/org/chromium/components/browser_ui/widget/text/AlertDialogEditText.java",
    "java/src/org/chromium/components/browser_ui/widget/text/TemplatePreservingTextView.java",
    "java/src/org/chromium/components/browser_ui/widget/text/TextViewWithCompoundDrawables.java",
    "java/src/org/chromium/components/browser_ui/widget/text/VerticallyFixedEditText.java",
    "java/src/org/chromium/components/browser_ui/widget/textbubble/ArrowBubbleDrawable.java",
    "java/src/org/chromium/components/browser_ui/widget/textbubble/TextBubble.java",
    "java/src/org/chromium/components/browser_ui/widget/textbubble/TextBubbleBackPressHandler.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileView.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileViewBinder.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileViewCoordinator.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileViewMediator.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileViewProperties.java",
  ]

  deps = [
    ":java_resources",
    "//base:base_java",
    "//build/android:build_java",
    "//components/browser_ui/styles/android:java",
    "//components/browser_ui/util/android:java",
    "//components/browser_ui/util/android:java_resources",
    "//components/embedder_support/android:util_java",
    "//third_party/android_deps:material_design_java",
    "//third_party/androidx:androidx_activity_activity_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_appcompat_appcompat_java",
    "//third_party/androidx:androidx_appcompat_appcompat_resources_java",
    "//third_party/androidx:androidx_constraintlayout_constraintlayout_java",
    "//third_party/androidx:androidx_coordinatorlayout_coordinatorlayout_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_interpolator_interpolator_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_vectordrawable_vectordrawable_animated_java",
    "//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
    "//ui/accessibility:ax_base_java",
    "//ui/android:ui_java",
    "//url:gurl_java",
  ]
  resources_package = "org.chromium.components.browser_ui.widget"
}

android_resources("java_resources") {
  sources = [
    "java/res/anim/chip_in.xml",
    "java/res/anim/chip_out.xml",
    "java/res/anim/image_grid_enter.xml",
    "java/res/anim/image_tile_enter.xml",
    "java/res/anim/textbubble_in.xml",
    "java/res/anim/textbubble_out.xml",
    "java/res/color/chip_background_color.xml",
    "java/res/color/chip_ripple_color.xml",
    "java/res/color/chip_state_layer_color.xml",
    "java/res/color/chip_stroke_color.xml",
    "java/res/color/chip_text_color.xml",
    "java/res/color/menu_chip_background.xml",
    "java/res/drawable-hdpi/btn_delete_24dp.png",
    "java/res/drawable-hdpi/btn_info.png",
    "java/res/drawable-hdpi/ic_arrow_back_white_24dp.png",
    "java/res/drawable-hdpi/ic_check_googblue_24dp.png",
    "java/res/drawable-hdpi/ic_error_outline_googblue_24dp.png",
    "java/res/drawable-hdpi/ic_more_vert_24dp_on_dark_bg.png",
    "java/res/drawable-hdpi/ic_more_vert_24dp_on_light_bg.png",
    "java/res/drawable-mdpi/btn_delete_24dp.png",
    "java/res/drawable-mdpi/btn_info.png",
    "java/res/drawable-mdpi/ic_arrow_back_white_24dp.png",
    "java/res/drawable-mdpi/ic_check_googblue_24dp.png",
    "java/res/drawable-mdpi/ic_error_outline_googblue_24dp.png",
    "java/res/drawable-mdpi/ic_more_vert_24dp_on_dark_bg.png",
    "java/res/drawable-mdpi/ic_more_vert_24dp_on_light_bg.png",
    "java/res/drawable-v23/app_menu_bg.xml",
    "java/res/drawable-v23/dialog_bg_no_shadow.xml",
    "java/res/drawable-v23/modern_toolbar_text_box_background.xml",
    "java/res/drawable-v23/sheet_background.xml",
    "java/res/drawable-v31/app_menu_bg.xml",
    "java/res/drawable-v31/dialog_bg_no_shadow.xml",
    "java/res/drawable-v31/menu_bg_tinted.xml",
    "java/res/drawable-v31/modern_toolbar_text_box_background.xml",
    "java/res/drawable-v31/sheet_background.xml",
    "java/res/drawable-xhdpi/btn_delete_24dp.png",
    "java/res/drawable-xhdpi/btn_info.png",
    "java/res/drawable-xhdpi/ic_arrow_back_white_24dp.png",
    "java/res/drawable-xhdpi/ic_check_googblue_24dp.png",
    "java/res/drawable-xhdpi/ic_error_outline_googblue_24dp.png",
    "java/res/drawable-xhdpi/ic_more_vert_24dp_on_dark_bg.png",
    "java/res/drawable-xhdpi/ic_more_vert_24dp_on_light_bg.png",
    "java/res/drawable-xxhdpi/btn_delete_24dp.png",
    "java/res/drawable-xxhdpi/btn_info.png",
    "java/res/drawable-xxhdpi/ic_arrow_back_white_24dp.png",
    "java/res/drawable-xxhdpi/ic_check_googblue_24dp.png",
    "java/res/drawable-xxhdpi/ic_error_outline_googblue_24dp.png",
    "java/res/drawable-xxhdpi/ic_more_vert_24dp_on_dark_bg.png",
    "java/res/drawable-xxhdpi/ic_more_vert_24dp_on_light_bg.png",
    "java/res/drawable-xxxhdpi/btn_delete_24dp.png",
    "java/res/drawable-xxxhdpi/btn_info.png",
    "java/res/drawable-xxxhdpi/ic_arrow_back_white_24dp.png",
    "java/res/drawable-xxxhdpi/ic_check_googblue_24dp.png",
    "java/res/drawable-xxxhdpi/ic_error_outline_googblue_24dp.png",
    "java/res/drawable-xxxhdpi/ic_more_vert_24dp_on_dark_bg.png",
    "java/res/drawable-xxxhdpi/ic_more_vert_24dp_on_light_bg.png",
    "java/res/drawable/async_image_view_unavailable.xml",
    "java/res/drawable/async_image_view_waiting.xml",
    "java/res/drawable/bg_white_dialog.xml",
    "java/res/drawable/bottom_sheet_background.xml",
    "java/res/drawable/card_with_corners_background.xml",
    "java/res/drawable/gradient_paragraph_loading_animation.xml",
    "java/res/drawable/home_surface_ui_background.xml",
    "java/res/drawable/ic_arrow_back_24dp.xml",
    "java/res/drawable/ic_check_googblue_24dp_animated.xml",
    "java/res/drawable/ic_offline_pin_blue_white.xml",
    "java/res/drawable/ic_settings_gear_24dp.xml",
    "java/res/drawable/ic_settings_gear_24dp.xml",
    "java/res/drawable/incognito_card_bg.xml",
    "java/res/drawable/list_item_icon_modern_bg.xml",
    "java/res/drawable/menu_bg_tinted_on_dark_bg.xml",
    "java/res/drawable/modern_toolbar_tablet_text_box_background.xml",
    "java/res/drawable/modern_toolbar_text_box_background_highlight.xml",
    "java/res/drawable/oval_surface_0.xml",
    "java/res/drawable/oval_surface_1.xml",
    "java/res/drawable/oval_surface_2.xml",
    "java/res/drawable/oval_surface_3.xml",
    "java/res/drawable/query_tile_overlay.xml",
    "java/res/drawable/rectangle_surface_1.xml",
    "java/res/drawable/rounded_rectangle_surface_0.xml",
    "java/res/drawable/rounded_rectangle_surface_1.xml",
    "java/res/drawable/search_row_modern_bg.xml",
    "java/res/drawable/search_toolbar_modern_bg.xml",
    "java/res/drawable/tile_view_highlight.xml",
    "java/res/drawable/tile_view_highlight_mask.xml",
    "java/res/layout/app_menu_layout.xml",
    "java/res/layout/automotive_layout_with_horizontal_back_button_toolbar.xml",
    "java/res/layout/automotive_layout_with_vertical_back_button_toolbar.xml",
    "java/res/layout/checkbox_with_description.xml",
    "java/res/layout/date_divided_adapter_header_view_holder.xml",
    "java/res/layout/dialog_control_description.xml",
    "java/res/layout/empty_state_view.xml",
    "java/res/layout/expand_arrow_with_separator.xml",
    "java/res/layout/indeterminate_progress_view.xml",
    "java/res/layout/iph_dialog_layout.xml",
    "java/res/layout/material_switch_with_text.xml",
    "java/res/layout/material_switch_with_title_and_summary.xml",
    "java/res/layout/modern_list_item_small_icon_view.xml",
    "java/res/layout/modern_list_item_view.xml",
    "java/res/layout/more_progress_button.xml",
    "java/res/layout/number_roll_view.xml",
    "java/res/layout/preference_switch.xml",
    "java/res/layout/promo_card_view_compact.xml",
    "java/res/layout/promo_card_view_large.xml",
    "java/res/layout/promo_card_view_slim.xml",
    "java/res/layout/promo_dialog_layout.xml",
    "java/res/layout/query_tile_view.xml",
    "java/res/layout/radio_button_layout_element.xml",
    "java/res/layout/radio_button_with_description.xml",
    "java/res/layout/radio_button_with_edit_text.xml",
    "java/res/layout/search_toolbar.xml",
    "java/res/layout/selectable_list_layout.xml",
    "java/res/layout/textbubble_text.xml",
    "java/res/layout/textbubble_text_with_image.xml",
    "java/res/layout/tile_no_text_view.xml",
    "java/res/layout/tile_no_text_view_condensed.xml",
    "java/res/layout/tile_view_modern.xml",
    "java/res/layout/tile_view_modern_condensed.xml",
    "java/res/layout/title_and_description_layout.xml",
    "java/res/values-night/colors.xml",
    "java/res/values-night/dimens.xml",
    "java/res/values-night/drawables.xml",
    "java/res/values-sw600dp/dimens.xml",
    "java/res/values-v31/styles.xml",
    "java/res/values/attrs.xml",
    "java/res/values/colors.xml",
    "java/res/values/dimens.xml",
    "java/res/values/drawables.xml",
    "java/res/values/ids.xml",
    "java/res/values/styles.xml",
    "java/res/values/values.xml",
  ]
  deps = [
    "shared_with_webview:java_resources",
    "//components/browser_ui/strings/android:browser_ui_strings_grd",
    "//components/browser_ui/styles/android:java_resources",
    "//third_party/android_deps:material_design_java",
    "//third_party/androidx:androidx_constraintlayout_constraintlayout_java",
    "//ui/android:ui_java_resources",
  ]
}

android_library("test_support_java") {
  testonly = true
  resources_package = "org.chromium.components.browser_ui.widget"

  sources = [
    "test/java/src/org/chromium/components/browser_ui/widget/RecyclerViewTestUtils.java",
    "test/java/src/org/chromium/components/browser_ui/widget/highlight/ViewHighlighterTestUtils.java",
  ]
  deps = [
    ":java",
    "//base:base_java_test_support",
    "//base:tasks_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/hamcrest:hamcrest_core_java",
    "//third_party/hamcrest:hamcrest_library_java",
    "//ui/android:ui_no_recycler_view_java",
    "//ui/android:ui_recycler_view_java",
  ]
}

android_library("unit_device_javatests") {
  testonly = true
  resources_package = "org.chromium.components.browser_ui.widget.test"

  sources = [
    "java/src/org/chromium/components/browser_ui/widget/CheckBoxWithDescriptionTest.java",
    "java/src/org/chromium/components/browser_ui/widget/DualControlLayoutTest.java",
    "java/src/org/chromium/components/browser_ui/widget/MoreProgressButtonTest.java",
    "java/src/org/chromium/components/browser_ui/widget/NumberRollViewTest.java",
    "java/src/org/chromium/components/browser_ui/widget/PromoDialogRenderTest.java",
    "java/src/org/chromium/components/browser_ui/widget/PromoDialogTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonLayoutTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonRenderTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButtonTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionLayoutTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditTextTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RadioButtonWithIconRenderTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RoundedIconGeneratorTest.java",
    "java/src/org/chromium/components/browser_ui/widget/WrappingLayoutTest.java",
    "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragReorderableRecyclerViewAdapterTest.java",
    "java/src/org/chromium/components/browser_ui/widget/highlight/ViewHighlighterTest.java",
    "java/src/org/chromium/components/browser_ui/widget/listmenu/BrowserUiListMenuRenderTest.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java",
    "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java",
  ]
  deps = [
    ":java",
    ":java_resources",
    ":java_test_resources",
    ":test_support_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/test/android:chrome_java_test_support_common",
    "//components/browser_ui/test/android:test_support_java",
    "//components/browser_ui/theme/android:java_resources",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_appcompat_appcompat_resources_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_rules_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//third_party/mockito:mockito_java",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
  ]
}

android_resources("java_test_resources") {
  testonly = true

  sources = [
    "test/java/res/drawable-hdpi/promo_dialog_test_drawable.png",
    "test/java/res/drawable-mdpi/promo_dialog_test_drawable.png",
    "test/java/res/drawable-xhdpi/promo_dialog_test_drawable.png",
    "test/java/res/drawable-xxhdpi/promo_dialog_test_drawable.png",
    "test/java/res/drawable-xxxhdpi/promo_dialog_test_drawable.png",
    "test/java/res/drawable/promo_dialog_test_vector.xml",
    "test/java/res/drawable/test_ic_arrow_downward_black_24dp.xml",
    "test/java/res/drawable/test_ic_arrow_forward_black_24dp.xml",
    "test/java/res/drawable/test_ic_info_outline_black_24dp.xml",
    "test/java/res/drawable/test_ic_more_vert_black_24dp.xml",
    "test/java/res/drawable/test_ic_refresh_black_24dp.xml",
    "test/java/res/drawable/test_ic_star_border_black_24dp.xml",
    "test/java/res/drawable/test_ic_vintage_filter.xml",
    "test/java/res/drawable/test_illustration.xml",
    "test/java/res/drawable/test_logo_avatar_anonymous.xml",
    "test/java/res/layout/dual_control_test_layout.xml",
    "test/java/res/layout/radio_button_render_test.xml",
    "test/java/res/layout/radio_button_with_description_and_aux_button_test.xml",
    "test/java/res/layout/radio_button_with_description_layout_test.xml",
    "test/java/res/layout/radio_button_with_edit_text_test.xml",
    "test/java/res/layout/radio_button_with_icon_render_test.xml",
    "test/java/res/values/strings.xml",
  ]
  deps = [
    ":java_resources",
    "//ui/android:ui_java_resources",
  ]
}

robolectric_library("junit") {
  resources_package = "org.chromium.components.browser_ui.widget"
  sources = [
    "java/src/org/chromium/components/browser_ui/widget/ChromeTransitionDrawableTest.java",
    "java/src/org/chromium/components/browser_ui/widget/CompositeTouchDelegateUnitTest.java",
    "java/src/org/chromium/components/browser_ui/widget/ContextMenuDialogUnitTest.java",
    "java/src/org/chromium/components/browser_ui/widget/RoundedCornerOutlineProviderUnitTest.java",
    "java/src/org/chromium/components/browser_ui/widget/displaystyle/ViewResizerUtilTest.java",
    "java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListenerTest.java",
    "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardCoordinatorUnitTest.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableItemViewBaseTest.java",
    "java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectionDelegateTest.java",
    "java/src/org/chromium/components/browser_ui/widget/tile/TileViewBinderTest.java",
  ]
  deps = [
    ":java",
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//base/test:test_support_java",
    "//components/browser_ui/test/android:test_support_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/junit",
    "//third_party/mockito:mockito_java",
    "//ui/accessibility:ax_base_java",
    "//ui/android:ui_java_test_support",
    "//ui/android:ui_no_recycler_view_java",
  ]
}