Disable or skip tests that are failing under the ChromeRefresh2023 flags.
Bug: 1521414 Change-Id: I63354f294f5cbd7dd2682e60bb414eaa82e836a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5237435 Commit-Queue: Allen Bauer <kylixrd@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: manuk hovanesian <manukh@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/main@{#1252841}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d3db591b27
commit
cc5fb4bffc
chrome/browser
picture_in_picture
search
themes
ui
browser_focus_uitest.cc
extensions
toolbar
views
webui
whats_new
components/omnibox/browser
ui/message_center/views
@ -9,8 +9,11 @@
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/test/mock_callback.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "components/url_formatter/url_formatter.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/events/test/event_generator.h"
|
||||
#include "ui/gfx/text_elider.h"
|
||||
#include "ui/views/test/views_test_base.h"
|
||||
@ -224,6 +227,13 @@ TEST_F(AutoPipSettingViewTest, TestOriginLabelForGURLWithLocalHost) {
|
||||
}
|
||||
|
||||
TEST_F(AutoPipSettingViewTest, WidgetIsCenteredWhenArrowIsFloat) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
|
||||
BUILDFLAG(IS_LINUX)
|
||||
// TODO (crbug/1521332): Evaluate fix and re-enable
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
// Set up the anchor view.
|
||||
views::Widget::InitParams anchor_view_widget_params =
|
||||
CreateParams(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
|
||||
|
@ -697,6 +697,10 @@ TEST_F(NtpCustomBackgroundServiceTest, ConfirmBackgroundChanges) {
|
||||
}
|
||||
|
||||
TEST_F(NtpCustomBackgroundServiceTest, TestUpdateCustomBackgroundColor) {
|
||||
// TODO (crbug/1520873): Fix and re-enable or remove if no longer relevant.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
// Turn on Color Extraction feature.
|
||||
base::test::ScopedFeatureList scoped_feature_list;
|
||||
scoped_feature_list.InitAndEnableFeature(
|
||||
|
@ -247,8 +247,9 @@ class ColorProviderTest
|
||||
// this to reflect test params and propagate any updates.
|
||||
native_theme_ = ui::NativeTheme::GetInstanceForNativeUi();
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
if (system_theme == SystemTheme::kCustom)
|
||||
if (system_theme == SystemTheme::kCustom) {
|
||||
native_theme_ = ui::GetDefaultLinuxUiTheme()->GetNativeTheme();
|
||||
}
|
||||
#endif
|
||||
original_forced_colors_ = native_theme_->InForcedColorsMode();
|
||||
original_preferred_contrast_ = native_theme_->GetPreferredContrast();
|
||||
@ -256,8 +257,9 @@ class ColorProviderTest
|
||||
|
||||
const bool high_contrast = contrast_mode == ContrastMode::kHighContrast;
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (high_contrast)
|
||||
if (high_contrast) {
|
||||
color_scheme = ui::NativeTheme::ColorScheme::kPlatformHighContrast;
|
||||
}
|
||||
native_theme_->set_forced_colors(high_contrast);
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
native_theme_->SetPreferredContrast(
|
||||
@ -602,11 +604,21 @@ TEST_F(ThemeServiceTest, UseDefaultTheme_DisableNtpThemeTest) {
|
||||
}
|
||||
|
||||
TEST_P(ColorProviderTest, OmniboxContrast) {
|
||||
// TODO(crbug.com/1336315): Windows platform high contrast colors are
|
||||
// not sufficiently high-contrast to pass this test.
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// TODO(crbug.com/1336315): Windows platform high contrast colors are not
|
||||
// sufficiently high-contrast to pass this test.
|
||||
if (std::get<ContrastMode>(GetParam()) == ContrastMode::kHighContrast)
|
||||
if (std::get<ContrastMode>(GetParam()) == ContrastMode::kHighContrast) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
// TODO(crbug/1521414): Linux platform native dark mode colors aren't
|
||||
// sufficiently high contrast to pass.
|
||||
if (std::get<SystemTheme>(GetParam()) == SystemTheme::kCustom &&
|
||||
std::get<ui::NativeTheme::ColorScheme>(GetParam()) ==
|
||||
ui::NativeTheme::ColorScheme::kDark) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
constexpr ui::ColorId contrasting_ids[][2] = {
|
||||
@ -673,8 +685,9 @@ TEST_P(ColorProviderTest, OmniboxContrast) {
|
||||
<< "\nColor 2: " << theme_service::test::ColorIdToString(id2)
|
||||
<< " - " << color2;
|
||||
};
|
||||
for (const ui::ColorId* ids : contrasting_ids)
|
||||
for (const ui::ColorId* ids : contrasting_ids) {
|
||||
check_sufficient_contrast(ids[0], ids[1]);
|
||||
}
|
||||
#if !BUILDFLAG(USE_GTK) && !BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
// TODO(crbug.com/1336796): GTK and LaCrOS do not have a sufficiently
|
||||
// high-contrast selected row color to pass this test.
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "net/test/embedded_test_server/embedded_test_server.h"
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "ui/base/test/ui_controls.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/views/focus/focus_manager.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
|
||||
@ -763,6 +764,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, NoFocusForBackgroundNTP) {
|
||||
#define MAYBE_PopupLocationBar PopupLocationBar
|
||||
#endif
|
||||
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_PopupLocationBar) {
|
||||
// TODO (crbug/1520655): Remove the skip once the test is fixed.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
Browser* popup_browser = CreateBrowserForPopup(browser()->profile());
|
||||
|
||||
// Make sure the popup is in the front. Otherwise the test is flaky.
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "content/public/test/browser_test.h"
|
||||
#include "extensions/common/image_util.h"
|
||||
#include "ui/base/buildflags.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
||||
@ -31,6 +32,12 @@ using ImageUtilTest = extensions::ExtensionBrowserTest;
|
||||
// color through an interface of some sort, removing this hardcoded
|
||||
// value.
|
||||
IN_PROC_BROWSER_TEST_F(ImageUtilTest, CheckDefaultToolbarColor) {
|
||||
// TODO (crbug/1520617): This should be re-evaluated with CR2023 enabled which
|
||||
// also enables the new material colors within the
|
||||
// color-pipeline.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
// This test relies on being run with the default light mode system theme.
|
||||
ui::NativeTheme::GetInstanceForNativeUi()->set_use_dark_colors(false);
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
|
@ -121,7 +121,11 @@ class RecentTabsSubMenuModelTest : public BrowserWithTestWindowTest,
|
||||
? std::vector<base::test::FeatureRef>{features::kSidePanelPinning,
|
||||
features::kChromeRefresh2023}
|
||||
: std::vector<base::test::FeatureRef>{},
|
||||
/*disabled_features=*/{});
|
||||
/*disabled_features=*/GetParam()
|
||||
? std::vector<base::test::FeatureRef>{}
|
||||
: std::vector<base::test::FeatureRef>{
|
||||
features::kChromeRefresh2023,
|
||||
features::kChromeRefreshSecondary2023});
|
||||
}
|
||||
RecentTabsSubMenuModelTest(const RecentTabsSubMenuModelTest&) = delete;
|
||||
RecentTabsSubMenuModelTest& operator=(const RecentTabsSubMenuModelTest&) =
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "ui/base/interaction/expect_call_in_scope.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/views/controls/focus_ring.h"
|
||||
#include "ui/views/controls/scroll_view.h"
|
||||
#include "ui/views/controls/textfield/textfield.h"
|
||||
@ -583,6 +584,11 @@ TEST_F(BookmarkEditorViewTest, ConcurrentDeleteDuringConfirmationDialog) {
|
||||
// Add enough new folders to scroll to the bottom of the scroll view. Verify
|
||||
// that the editor at the end can still be fully visible.
|
||||
TEST_F(BookmarkEditorViewTest, EditorFullyShown) {
|
||||
// TODO (crbug/1521085): Fix and re-enable or remove if no longer relevant for
|
||||
// ChromeRefresh2023.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
CreateEditor(profile_.get(), nullptr,
|
||||
BookmarkEditor::EditDetails::EditNode(GetNode("oa")),
|
||||
BookmarkEditorView::SHOW_TREE);
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "ui/base/interaction/interaction_sequence.h"
|
||||
#include "ui/base/page_transition_types.h"
|
||||
#include "ui/base/test/ui_controls.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/events/event.h"
|
||||
#include "ui/events/event_constants.h"
|
||||
#include "ui/events/keycodes/dom/dom_code.h"
|
||||
@ -547,6 +548,13 @@ IN_PROC_BROWSER_TEST_F(SavedTabGroupInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(SavedTabGroupInteractiveTest,
|
||||
OverflowMenuUpdatesWhileOpen) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521486): Test fails on MacOS when ChromeRefresh2023 flags are
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
// Add 5 additional tabs to the browser.
|
||||
ASSERT_TRUE(
|
||||
AddTabAtIndex(0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED));
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "base/test/metrics/user_action_tester.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
||||
#include "chrome/browser/commerce/shopping_service_factory.h"
|
||||
#include "chrome/browser/image_fetcher/image_fetcher_service_factory.h"
|
||||
@ -42,6 +44,7 @@
|
||||
#include "ui/base/interaction/element_tracker.h"
|
||||
#include "ui/base/interaction/interactive_test.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/views/controls/styled_label.h"
|
||||
@ -183,6 +186,13 @@ class PriceTrackingIconViewInteractiveTest : public InteractiveBrowserTest {
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
FUEBubbleShownOnPress) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
RunTestSequence(
|
||||
InstrumentTab(kShoppingTab),
|
||||
@ -241,6 +251,13 @@ IN_PROC_BROWSER_TEST_F(
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
PriceTrackingBubbleShownOnPress_AfterFUE) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
prefs::kShouldShowPriceTrackFUEBubble, false);
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
@ -263,6 +280,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
BubbleCanBeReshowOnPress) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
|
||||
RunTestSequence(
|
||||
@ -349,6 +373,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
CreateBookmarkOnPressIfNotExist) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
prefs::kShouldShowPriceTrackFUEBubble, false);
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
@ -368,6 +399,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
RecordOmniboxChipClicked) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
base::UserActionTester user_action_tester;
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
EXPECT_EQ(user_action_tester.GetActionCount(
|
||||
@ -386,6 +424,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
RecordOmniboxChipTracked) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
base::UserActionTester user_action_tester;
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
@ -407,6 +452,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
NoRecordOmniboxChipTracked_ForTrackedProduct) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
base::UserActionTester user_action_tester;
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(true);
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
@ -429,6 +481,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingIconViewInteractiveTest,
|
||||
NoRecordOmniboxChipTracked_ForFUEFlow) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
base::UserActionTester user_action_tester;
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
EXPECT_EQ(user_action_tester.GetActionCount(
|
||||
@ -547,6 +606,13 @@ class PriceTrackingBubbleInteractiveTest
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingBubbleInteractiveTest,
|
||||
RecordFirstRunBubbleShown) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
EXPECT_EQ(user_action_tester_.GetActionCount(
|
||||
"Commerce.PriceTracking.FirstRunBubbleShown"),
|
||||
@ -567,6 +633,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingBubbleInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingBubbleInteractiveTest,
|
||||
RecordConfirmationShown) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
prefs::kShouldShowPriceTrackFUEBubble, false);
|
||||
@ -588,6 +661,13 @@ IN_PROC_BROWSER_TEST_F(PriceTrackingBubbleInteractiveTest,
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PriceTrackingBubbleInteractiveTest,
|
||||
RecordConfirmationUntracked) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// TODO (crbug/1521812): Test is failing on Mac under ChromeRefresh2023 flags.
|
||||
// Evaluate, fix, and remove the skip.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
#endif
|
||||
mock_shopping_service_->SetIsSubscribedCallbackValue(false);
|
||||
browser()->profile()->GetPrefs()->SetBoolean(
|
||||
prefs::kShouldShowPriceTrackFUEBubble, false);
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include "ui/base/dragdrop/drop_target_event.h"
|
||||
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
|
||||
#include "ui/base/dragdrop/os_exchange_data.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/compositor/layer_tree_owner.h"
|
||||
#include "ui/gfx/geometry/point.h"
|
||||
#include "ui/gfx/geometry/point_f.h"
|
||||
@ -162,8 +163,9 @@ class DragAndDropSimulator {
|
||||
|
||||
aura::client::DragDropDelegate* delegate =
|
||||
GetOmniboxDragDropDelegate(omnibox);
|
||||
if (!delegate)
|
||||
if (!delegate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
active_drag_event_ = base::WrapUnique(new ui::DropTargetEvent(
|
||||
*os_exchange_data_, gfx::PointF(location), gfx::PointF(location),
|
||||
@ -184,8 +186,9 @@ class DragAndDropSimulator {
|
||||
}
|
||||
|
||||
aura::client::DragDropDelegate* delegate = GetDropDelegate();
|
||||
if (!delegate)
|
||||
if (!delegate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gfx::PointF event_location;
|
||||
gfx::PointF event_root_location;
|
||||
@ -216,8 +219,9 @@ class DragAndDropSimulator {
|
||||
|
||||
aura::client::DragDropDelegate* delegate =
|
||||
GetOmniboxDragDropDelegate(omnibox);
|
||||
if (!delegate)
|
||||
if (!delegate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
active_drag_event_->set_location_f(gfx::PointF(location));
|
||||
active_drag_event_->set_root_location_f(gfx::PointF(location));
|
||||
@ -239,8 +243,9 @@ class DragAndDropSimulator {
|
||||
}
|
||||
|
||||
aura::client::DragDropDelegate* delegate = GetDragDelegate();
|
||||
if (!delegate)
|
||||
if (!delegate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
gfx::PointF event_location;
|
||||
gfx::PointF event_root_location;
|
||||
@ -364,14 +369,18 @@ class DragStartWaiter : public aura::client::DragDropClient {
|
||||
if (source_origin) {
|
||||
*source_origin = source_origin_;
|
||||
}
|
||||
if (text)
|
||||
if (text) {
|
||||
*text = text_;
|
||||
if (html)
|
||||
}
|
||||
if (html) {
|
||||
*html = html_;
|
||||
if (operation)
|
||||
}
|
||||
if (operation) {
|
||||
*operation = operation_;
|
||||
if (location_inside_web_contents)
|
||||
}
|
||||
if (location_inside_web_contents) {
|
||||
*location_inside_web_contents = location_inside_web_contents_;
|
||||
}
|
||||
}
|
||||
|
||||
void WaitUntilDragStart() {
|
||||
@ -400,17 +409,19 @@ class DragStartWaiter : public aura::client::DragDropClient {
|
||||
|
||||
source_origin_ = data->GetRendererTaintedOrigin();
|
||||
std::u16string text;
|
||||
if (data->GetString(&text))
|
||||
if (data->GetString(&text)) {
|
||||
text_ = base::UTF16ToUTF8(text);
|
||||
else
|
||||
} else {
|
||||
text_ = "<no text>";
|
||||
}
|
||||
|
||||
GURL base_url;
|
||||
std::u16string html;
|
||||
if (data->GetHtml(&html, &base_url))
|
||||
if (data->GetHtml(&html, &base_url)) {
|
||||
html_ = base::UTF16ToUTF8(html);
|
||||
else
|
||||
} else {
|
||||
html_ = "<no html>";
|
||||
}
|
||||
|
||||
gfx::Rect bounds =
|
||||
web_contents_->GetContentNativeView()->GetBoundsInScreen();
|
||||
@ -427,8 +438,9 @@ class DragStartWaiter : public aura::client::DragDropClient {
|
||||
callback_to_run_inside_drag_and_drop_message_loop_.Reset();
|
||||
}
|
||||
|
||||
if (suppress_passing_of_start_drag_further_)
|
||||
if (suppress_passing_of_start_drag_further_) {
|
||||
return DragOperation::kNone;
|
||||
}
|
||||
|
||||
// Start a nested drag-and-drop loop (might not return for a long time).
|
||||
return old_client_->StartDragAndDrop(std::move(data), root_window,
|
||||
@ -496,8 +508,9 @@ class DOMDragEventWaiter {
|
||||
bool got_right_event_type = false;
|
||||
bool got_right_window_name = false;
|
||||
do {
|
||||
if (!dom_message_queue_.WaitForMessage(&candidate_event))
|
||||
if (!dom_message_queue_.WaitForMessage(&candidate_event)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
got_right_event_type =
|
||||
IsExpectedEventType(candidate_event, event_type_to_wait_for_);
|
||||
@ -505,8 +518,9 @@ class DOMDragEventWaiter {
|
||||
IsExpectedWindowName(candidate_event, target_frame_name_);
|
||||
} while (!got_right_event_type || !got_right_window_name);
|
||||
|
||||
if (found_event)
|
||||
if (found_event) {
|
||||
*found_event = candidate_event;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -593,8 +607,9 @@ class DOMDragEventVerifier {
|
||||
static testing::Matcher<std::string> FieldMatches(
|
||||
const std::string& field_name,
|
||||
const std::string& expected_value) {
|
||||
if (expected_value == "<no expectation>")
|
||||
if (expected_value == "<no expectation>") {
|
||||
return testing::A<std::string>();
|
||||
}
|
||||
|
||||
return testing::HasSubstr(base::StringPrintf(
|
||||
"\"%s\":\"%s\"", field_name.c_str(), expected_value.c_str()));
|
||||
@ -819,8 +834,9 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
|
||||
content::WebContents* web_contents = nullptr) {
|
||||
content::RenderFrameHost* frame = GetFrameByName(frame_name, web_contents);
|
||||
|
||||
if (!frame)
|
||||
if (!frame) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Navigate the frame and wait for the load event.
|
||||
std::string script = base::StringPrintf(
|
||||
@ -863,18 +879,23 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
|
||||
DOMDragEventWaiter mouse_move_event_waiter("mousemove", GetLeftFrame());
|
||||
DOMDragEventWaiter mouse_down_event_waiter("mousedown", GetLeftFrame());
|
||||
|
||||
if (!SimulateMouseMove(kMiddleOfLeftFrame))
|
||||
if (!SimulateMouseMove(kMiddleOfLeftFrame)) {
|
||||
return false;
|
||||
if (!mouse_move_event_waiter.WaitForNextMatchingEvent(nullptr))
|
||||
}
|
||||
if (!mouse_move_event_waiter.WaitForNextMatchingEvent(nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SimulateMouseDown())
|
||||
if (!SimulateMouseDown()) {
|
||||
return false;
|
||||
if (!mouse_down_event_waiter.WaitForNextMatchingEvent(nullptr))
|
||||
}
|
||||
if (!mouse_down_event_waiter.WaitForNextMatchingEvent(nullptr)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SimulateMouseMove(expected_location_of_drag_start_in_left_frame()))
|
||||
if (!SimulateMouseMove(expected_location_of_drag_start_in_left_frame())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -956,8 +977,9 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
|
||||
aura::client::ScreenPositionClient* screen_position_client =
|
||||
aura::client::GetScreenPositionClient(window->GetRootWindow());
|
||||
gfx::Point screen_position(kMiddleOfRightFrame);
|
||||
if (screen_position_client)
|
||||
if (screen_position_client) {
|
||||
screen_position_client->ConvertPointToScreen(window, &screen_position);
|
||||
}
|
||||
return screen_position;
|
||||
}
|
||||
|
||||
@ -1007,6 +1029,12 @@ class DragAndDropBrowserTest : public InProcessBrowserTest,
|
||||
// Scenario: drag text from outside the browser and drop to the right frame.
|
||||
// Test coverage: dragover, drop DOM events.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest, DropTextFromOutside) {
|
||||
// TODO (crbug/1521094): Test fails when ChromeRefresh2023 and
|
||||
// ChromeRefreshSecondary2023 is enabled. Evaluate cause
|
||||
// and fix.
|
||||
if (features::IsChromeRefresh2023() && std::get<double>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
std::string frame_site = use_cross_site_subframe() ? "b.test" : "a.test";
|
||||
ASSERT_TRUE(NavigateToTestPage("a.test"));
|
||||
ASSERT_TRUE(NavigateRightFrame(frame_site, "drop_target.html"));
|
||||
@ -1344,6 +1372,12 @@ struct DragAndDropBrowserTest::DragImageBetweenFrames_TestState {
|
||||
// Test coverage: dragleave, dragenter, dragover, dragend, drop DOM events.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
MAYBE_DragSameOriginImageBetweenFrames) {
|
||||
// TODO (crbug/1521094): Disabled when scale factor is > 1.5 and
|
||||
// ChromeRefresh2023 and ChromeRefreshSecondary2023 is
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023() && std::get<1>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DragImageBetweenFrames_Start(/*image_same_origin=*/true,
|
||||
/*image_crossorigin_attr=*/false);
|
||||
}
|
||||
@ -1365,6 +1399,12 @@ IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
// Test coverage: dragleave, dragenter, dragover, dragend, drop DOM events.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
MAYBE_DragCorsSameOriginImageBetweenFrames) {
|
||||
// TODO (crbug/1521094): Disabled when scale factor is > 1.5 and
|
||||
// ChromeRefresh2023 and ChromeRefreshSecondary2023 is
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023() && std::get<1>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DragImageBetweenFrames_Start(/*image_same_origin=*/false,
|
||||
/*image_crossorigin_attr=*/true);
|
||||
}
|
||||
@ -1386,6 +1426,12 @@ IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
// Regression test for https://crbug.com/1264873.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
MAYBE_DragCrossOriginImageBetweenFrames) {
|
||||
// TODO (crbug/1521094): Disabled when scale factor is > 1.5 and
|
||||
// ChromeRefresh2023 and ChromeRefreshSecondary2023 is
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023() && std::get<1>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DragImageBetweenFrames_Start(/*image_same_origin=*/false,
|
||||
/*image_crossorigin_attr=*/false);
|
||||
}
|
||||
@ -1638,6 +1684,12 @@ struct DragAndDropBrowserTest::DragImageFromDisappearingFrame_TestState {
|
||||
// Test coverage: dragenter, dragover, drop DOM events.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest,
|
||||
MAYBE_DragImageFromDisappearingFrame) {
|
||||
// TODO (crbug/1521094): Disabled when scale factor is > 1.5 and
|
||||
// ChromeRefresh2023 and ChromeRefreshSecondary2023 is
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023() && std::get<1>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
// Load the test page.
|
||||
std::string frame_site = use_cross_site_subframe() ? "b.test" : "a.test";
|
||||
ASSERT_TRUE(NavigateToTestPage("a.test"));
|
||||
@ -1980,6 +2032,12 @@ struct DragAndDropBrowserTest::CrossTabDrag_TestState {
|
||||
//
|
||||
// Test coverage: dragenter, dragover, dragend, drop DOM events.
|
||||
IN_PROC_BROWSER_TEST_P(DragAndDropBrowserTest, MAYBE_CrossTabDrag) {
|
||||
// TODO (crbug/1521094): Disabled when scale factor is > 1.5 and
|
||||
// ChromeRefresh2023 and ChromeRefreshSecondary2023 is
|
||||
// enabled.
|
||||
if (features::IsChromeRefresh2023() && std::get<1>(GetParam()) > 1.5) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
std::string right_frame_site =
|
||||
use_cross_site_subframe() ? "b.test" : "a.test";
|
||||
ASSERT_TRUE(NavigateToTestPage("a.test"));
|
||||
|
@ -67,6 +67,7 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "ui/aura/env.h"
|
||||
#include "ui/base/test/ui_controls.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
@ -3992,6 +3993,10 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTestWithTabbedSystemApp,
|
||||
// Move tab from TYPE_APP Browser to another TYPE_APP Browser.
|
||||
IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTestWithTabbedSystemApp,
|
||||
DragAppToAppWindow) {
|
||||
// TODO (crbug/1521327): Test fails under ChromeRefresh2023. Skip for now.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
// Install and get 2 browsers with tabbed system app.
|
||||
webapps::AppId tabbed_app_id = InstallMockApp();
|
||||
Browser* app_browser1 = LaunchWebAppBrowser(tabbed_app_id);
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "components/tab_groups/tab_group_id.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "ui/base/pointer/touch_ui_controller.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
#include "ui/gfx/animation/animation_test_api.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
@ -589,6 +590,10 @@ TEST_P(TabStripTest, EventsOnClosingTab) {
|
||||
}
|
||||
|
||||
TEST_P(TabStripTest, ChangingLayoutTypeResizesTabs) {
|
||||
// TODO (crbug/1520595): Skip for now due to test failing when CR2023 enabled.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
SetMaxTabStripWidth(1000);
|
||||
|
||||
controller_->AddTab(0, TabActive::kInactive);
|
||||
|
@ -292,6 +292,10 @@ class AlertIndicatorButtonTest : public ChromeViewsTestBase {
|
||||
};
|
||||
|
||||
TEST_F(TabTest, HitTestTopPixel) {
|
||||
// TODO (crbug/1520660): Fix or remove test.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto tab_slot_controller = std::make_unique<FakeTabSlotController>();
|
||||
std::unique_ptr<views::Widget> widget = CreateTestWidget();
|
||||
Tab* tab =
|
||||
@ -318,6 +322,10 @@ TEST_F(TabTest, HitTestTopPixel) {
|
||||
}
|
||||
|
||||
TEST_F(TabTest, LayoutAndVisibilityOfElements) {
|
||||
// TODO (crbug/1520660): Fix or remove test.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
static const std::optional<TabAlertState> kAlertStatesToTest[] = {
|
||||
std::nullopt,
|
||||
TabAlertState::TAB_CAPTURING,
|
||||
@ -539,6 +547,10 @@ TEST_F(TabTest, FaviconDoesntMoveWhenShowingAlertIndicator) {
|
||||
}
|
||||
|
||||
TEST_F(TabTest, SmallTabsHideCloseButton) {
|
||||
// TODO (crbug/1520660): Fix or remove test.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto controller = std::make_unique<FakeTabSlotController>();
|
||||
std::unique_ptr<views::Widget> widget = CreateTestWidget();
|
||||
Tab* tab = widget->SetContentsView(std::make_unique<Tab>(controller.get()));
|
||||
@ -558,6 +570,10 @@ TEST_F(TabTest, SmallTabsHideCloseButton) {
|
||||
}
|
||||
|
||||
TEST_F(TabTest, ExtraLeftPaddingNotShownOnSmallActiveTab) {
|
||||
// TODO (crbug/1520660): Fix or remove test.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto controller = std::make_unique<FakeTabSlotController>();
|
||||
std::unique_ptr<views::Widget> widget = CreateTestWidget();
|
||||
Tab* tab = widget->SetContentsView(std::make_unique<Tab>(controller.get()));
|
||||
@ -595,6 +611,10 @@ TEST_F(TabTest, ExtraLeftPaddingShownOnSiteWithoutFavicon) {
|
||||
}
|
||||
|
||||
TEST_F(TabTest, ExtraAlertPaddingNotShownOnSmallActiveTab) {
|
||||
// TODO (crbug/1520660): Fix or remove test.
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto controller = std::make_unique<FakeTabSlotController>();
|
||||
std::unique_ptr<views::Widget> widget = CreateTestWidget();
|
||||
Tab* tab = widget->SetContentsView(std::make_unique<Tab>(controller.get()));
|
||||
|
@ -92,6 +92,10 @@ class WhatsNewUtilTests : public testing::Test {
|
||||
};
|
||||
|
||||
TEST_F(WhatsNewUtilTests, ShouldShowRefresh) {
|
||||
// TODO (crbug/1520881): Is this test still relevant post Cr2023 rollout?
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
// Set version to a refresh-compatible version.
|
||||
whats_new::SetChromeVersionForTests(119);
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "components/omnibox/common/omnibox_features.h"
|
||||
#include "testing/gmock/include/gmock/gmock.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
#include "ui/gfx/favicon_size.h"
|
||||
#include "ui/gfx/paint_vector_icon.h"
|
||||
@ -177,7 +178,11 @@ TEST_F(OmniboxViewTest, SanitizeTextForPaste) {
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
|
||||
// Tests GetIcon returns the default search icon when the match is a search
|
||||
// query.
|
||||
// TODO (crbug/1520005): Investigate and re-enable.
|
||||
TEST_F(OmniboxViewTest, GetIcon_Default) {
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
ui::ImageModel expected_icon = ui::ImageModel::FromVectorIcon(
|
||||
vector_icons::kSearchIcon, gfx::kPlaceholderColor, gfx::kFaviconSize);
|
||||
|
||||
@ -189,7 +194,11 @@ TEST_F(OmniboxViewTest, GetIcon_Default) {
|
||||
}
|
||||
|
||||
// Tests GetIcon returns the bookmark icon when the match is bookmarked.
|
||||
// TODO (crbug/1520009): Investigate and re-enable.
|
||||
TEST_F(OmniboxViewTest, GetIcon_BookmarkIcon) {
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
const GURL kUrl("https://bookmarks.com");
|
||||
|
||||
AutocompleteMatch match;
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/color/color_id.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
@ -181,8 +182,9 @@ class NotificationViewTest : public views::ViewObserver,
|
||||
// been created by `gfx::test::CreateImage`) was scaled to.
|
||||
gfx::Size GetImagePaintSize(ProportionalImageView* view) {
|
||||
CHECK(view);
|
||||
if (view->bounds().IsEmpty())
|
||||
if (view->bounds().IsEmpty()) {
|
||||
return gfx::Size();
|
||||
}
|
||||
|
||||
gfx::Size canvas_size = view->bounds().size();
|
||||
gfx::Canvas canvas(canvas_size, 1.0 /* image_scale */,
|
||||
@ -200,17 +202,21 @@ class NotificationViewTest : public views::ViewObserver,
|
||||
const int kHalfHeight = canvas_size.height() / 2;
|
||||
gfx::Rect rect(canvas_size);
|
||||
while (rect.width() > 0 &&
|
||||
bitmap.getColor(rect.x(), kHalfHeight) != kBitmapColor)
|
||||
bitmap.getColor(rect.x(), kHalfHeight) != kBitmapColor) {
|
||||
rect.Inset(gfx::Insets::TLBR(0, 1, 0, 0));
|
||||
}
|
||||
while (rect.height() > 0 &&
|
||||
bitmap.getColor(kHalfWidth, rect.y()) != kBitmapColor)
|
||||
bitmap.getColor(kHalfWidth, rect.y()) != kBitmapColor) {
|
||||
rect.Inset(gfx::Insets::TLBR(1, 0, 0, 0));
|
||||
}
|
||||
while (rect.width() > 0 &&
|
||||
bitmap.getColor(rect.right() - 1, kHalfHeight) != kBitmapColor)
|
||||
bitmap.getColor(rect.right() - 1, kHalfHeight) != kBitmapColor) {
|
||||
rect.Inset(gfx::Insets::TLBR(0, 0, 0, 1));
|
||||
}
|
||||
while (rect.height() > 0 &&
|
||||
bitmap.getColor(kHalfWidth, rect.bottom() - 1) != kBitmapColor)
|
||||
bitmap.getColor(kHalfWidth, rect.bottom() - 1) != kBitmapColor) {
|
||||
rect.Inset(gfx::Insets::TLBR(0, 0, 1, 0));
|
||||
}
|
||||
|
||||
return rect.size();
|
||||
}
|
||||
@ -459,7 +465,11 @@ TEST_F(NotificationViewTest, InlineSettingsBlockAll) {
|
||||
EXPECT_TRUE(delegate_->disable_notification_called());
|
||||
}
|
||||
|
||||
// TODO (crbug/1521442): Test fails under ChromeRefresh2023. Fix and re-enable.
|
||||
TEST_F(NotificationViewTest, TestAccentColor) {
|
||||
if (features::IsChromeRefresh2023()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
std::unique_ptr<Notification> notification = CreateSimpleNotification();
|
||||
notification->set_buttons(CreateButtons(2));
|
||||
|
||||
@ -471,8 +481,9 @@ TEST_F(NotificationViewTest, TestAccentColor) {
|
||||
notification_view()->GetWidget()->Show();
|
||||
|
||||
// Action buttons are hidden by collapsed state.
|
||||
if (!notification_view()->expanded_)
|
||||
if (!notification_view()->expanded_) {
|
||||
ToggleExpanded();
|
||||
}
|
||||
EXPECT_TRUE(notification_view()->actions_row_->GetVisible());
|
||||
|
||||
const auto* color_provider = notification_view()->GetColorProvider();
|
||||
|
Reference in New Issue
Block a user