Skip to content

Commit

Permalink
Correctly handle Fuchsia in tests requiring non-overlay scrollbars
Browse files Browse the repository at this point in the history
USE_NON_OVERLAY_SCROLLBARS() is renamed to
USE_NON_OVERLAY_SCROLLBARS_OR_QUIT() to make the quitting behavior
on platforms not supporting non-overlay scrollbars more obvious.
It now includes FUCHSIA in the list of such platforms.

Bug: 1313270
Change-Id: I601ad7c131d4232256366cd9befbaab140691033
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5068076
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1230254}
  • Loading branch information
wangxianzhu authored and Chromium LUCI CQ committed Nov 28, 2023
1 parent a987ab4 commit fa4c46b
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 196 deletions.
2 changes: 1 addition & 1 deletion third_party/blink/renderer/core/dom/document_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ TEST_F(DocumentTest, CanExecuteScriptsWithSandboxAndIsolatedWorld) {
}

TEST_F(DocumentTest, ElementFromPointOnScrollbar) {
USE_NON_OVERLAY_SCROLLBARS();
USE_NON_OVERLAY_SCROLLBARS_OR_QUIT();

GetDocument().SetCompatibilityMode(Document::kQuirksMode);
// This test requires that scrollbars take up space.
Expand Down
10 changes: 2 additions & 8 deletions third_party/blink/renderer/core/frame/visual_viewport_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,10 @@ TEST_P(VisualViewportTest, TestResize) {
EXPECT_EQ(new_viewport_size, visual_viewport.Size());
}

#if BUILDFLAG(IS_FUCHSIA)
// TODO(crbug.com/1313284): Fix this test on Fuchsia and re-enable.
#define MAYBE_TestVisibleContentRect DISABLED_TestVisibleContentRect
#else
#define MAYBE_TestVisibleContentRect TestVisibleContentRect
#endif
// Make sure that the visibleContentRect method acurately reflects the scale and
// scroll location of the viewport with and without scrollbars.
TEST_P(VisualViewportTest, MAYBE_TestVisibleContentRect) {
USE_NON_OVERLAY_SCROLLBARS();
TEST_P(VisualViewportTest, TestVisibleContentRect) {
USE_NON_OVERLAY_SCROLLBARS_OR_QUIT();
InitializeWithDesktopSettings();

RegisterMockedHttpURLLoad("200-by-300.html");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST_F(LayoutBlockTest, LayoutNameCalledWithNullStyle) {
}

TEST_F(LayoutBlockTest, WidthAvailableToChildrenChanged) {
USE_NON_OVERLAY_SCROLLBARS();
USE_NON_OVERLAY_SCROLLBARS_OR_QUIT();

SetBodyInnerHTML(R"HTML(
<!DOCTYPE html>
Expand Down
12 changes: 2 additions & 10 deletions third_party/blink/renderer/core/layout/map_coordinates_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1979,19 +1979,11 @@ TEST_F(MapCoordinatesTest, FixedPositionUnderTransformWithScrollOffset) {
kIgnoreScrollOffset));
}

#if BUILDFLAG(IS_FUCHSIA)
// TODO(crbug.com/1313287): Fix this test on Fuchsia and re-enable.
#define MAYBE_IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar \
DISABLED_IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar
#else
#define MAYBE_IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar \
IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar
#endif
// This test verifies that ignoring scroll offset works with writing modes and
// non-overlay scrollbar.
TEST_F(MapCoordinatesTest,
MAYBE_IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar) {
USE_NON_OVERLAY_SCROLLBARS();
IgnoreScrollOffsetWithWritingModesAndNonOverlayScrollbar) {
USE_NON_OVERLAY_SCROLLBARS_OR_QUIT();

SetBodyInnerHTML(R"HTML(
<style>
Expand Down
Loading

0 comments on commit fa4c46b

Please sign in to comment.