Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Unified Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 4b2a54419b35cd3f75d0ba0ded7ce1b9750a23c7..f1d4ba6ad4a8e386caa412eff9e83bd70b2281c1 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -900,10 +900,11 @@ TEST_P(VisualViewportTest, TestSavedToHistoryItem) {
frame()->page()->frameHost().visualViewport();
visualViewport.setScale(2);
- EXPECT_EQ(2, toLocalFrame(webViewImpl()->page()->mainFrame())
- ->loader()
- .currentItem()
- ->pageScaleFactor());
+ EXPECT_EQ(2,
+ toLocalFrame(webViewImpl()->page()->mainFrame())
+ ->loader()
+ .currentItem()
+ ->pageScaleFactor());
visualViewport.setLocation(FloatPoint(10, 20));
@@ -1164,8 +1165,9 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
WebFrameClient* oldClient = webViewImpl()->mainFrameImpl()->client();
MockWebFrameClient mockWebFrameClient;
- EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ EXPECT_CALL(mockWebFrameClient,
+ showContextMenu(
+ ContextMenuAtLocation(mouseDownEvent.x, mouseDownEvent.y)));
// Do a sanity check with no scale applied.
webViewImpl()->mainFrameImpl()->setClient(&mockWebFrameClient);
@@ -1183,8 +1185,9 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
webViewImpl()->setPageScaleFactor(2);
EXPECT_CALL(mockWebFrameClient, didChangeScrollOffset(_));
visualViewport.setLocation(FloatPoint(60, 80));
- EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ EXPECT_CALL(mockWebFrameClient,
+ showContextMenu(
+ ContextMenuAtLocation(mouseDownEvent.x, mouseDownEvent.y)));
mouseDownEvent.button = WebMouseEvent::Button::Right;
webViewImpl()->handleInputEvent(WebCoalescedInputEvent(mouseDownEvent));
@@ -1459,9 +1462,10 @@ TEST_P(VisualViewportTest, TestBrowserControlsAdjustmentAndResize) {
EXPECT_SIZE_EQ(
IntSize(250, (visualViewportHeight - browserControlsHeight) / pageScale),
visualViewport.visibleRect().size());
- EXPECT_SIZE_EQ(IntSize(1000, layoutViewportHeight -
- browserControlsHeight / minPageScale),
- frameView.frameRect().size());
+ EXPECT_SIZE_EQ(
+ IntSize(1000,
+ layoutViewportHeight - browserControlsHeight / minPageScale),
+ frameView.frameRect().size());
EXPECT_SIZE_EQ(IntSize(500, visualViewportHeight - browserControlsHeight),
visualViewport.size());
@@ -1548,11 +1552,13 @@ TEST_P(VisualViewportTest, TestBrowserControlsShrinkAdjustmentAndResize) {
visualViewport.visibleRect().size());
ScrollOffset frameViewExpected(
- 0, contentHeight -
- (layoutViewportHeight - browserControlsHeight / minPageScale));
+ 0,
+ contentHeight -
+ (layoutViewportHeight - browserControlsHeight / minPageScale));
ScrollOffset visualViewportExpected = ScrollOffset(
- 750, (layoutViewportHeight - browserControlsHeight / minPageScale -
- visualViewport.visibleRect().height()));
+ 750,
+ (layoutViewportHeight - browserControlsHeight / minPageScale -
+ visualViewport.visibleRect().height()));
EXPECT_SIZE_EQ(visualViewportExpected, visualViewport.getScrollOffset());
EXPECT_SIZE_EQ(frameViewExpected,
@@ -1571,9 +1577,10 @@ TEST_P(VisualViewportTest, TestBrowserControlsShrinkAdjustmentAndResize) {
EXPECT_SIZE_EQ(
IntSize(250, (visualViewportHeight - browserControlsHeight) / pageScale),
visualViewport.visibleRect().size());
- EXPECT_SIZE_EQ(IntSize(1000, layoutViewportHeight -
- browserControlsHeight / minPageScale),
- frameView.frameRect().size());
+ EXPECT_SIZE_EQ(
+ IntSize(1000,
+ layoutViewportHeight - browserControlsHeight / minPageScale),
+ frameView.frameRect().size());
EXPECT_SIZE_EQ(
totalExpected,
visualViewport.getScrollOffset() +
@@ -1942,15 +1949,17 @@ TEST_P(VisualViewportTest, TestCoordinateTransforms) {
// At scale = 2.
visualViewport.setScale(2);
- EXPECT_FLOAT_POINT_EQ(FloatPoint(55, 75), visualViewport.viewportToRootFrame(
- FloatPoint(110, 150)));
+ EXPECT_FLOAT_POINT_EQ(
+ FloatPoint(55, 75),
+ visualViewport.viewportToRootFrame(FloatPoint(110, 150)));
EXPECT_FLOAT_POINT_EQ(FloatPoint(110, 150),
visualViewport.rootFrameToViewport(FloatPoint(55, 75)));
// At scale = 2 and with the visual viewport offset.
visualViewport.setLocation(FloatPoint(10, 12));
- EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 62), visualViewport.viewportToRootFrame(
- FloatPoint(80, 100)));
+ EXPECT_FLOAT_POINT_EQ(
+ FloatPoint(50, 62),
+ visualViewport.viewportToRootFrame(FloatPoint(80, 100)));
EXPECT_FLOAT_POINT_EQ(FloatPoint(80, 100),
visualViewport.rootFrameToViewport(FloatPoint(50, 62)));
@@ -1965,8 +1974,9 @@ TEST_P(VisualViewportTest, TestCoordinateTransforms) {
// Scrolling the main frame should have no effect.
frameView.layoutViewportScrollableArea()->setScrollOffset(
ScrollOffset(100, 120), ProgrammaticScroll);
- EXPECT_FLOAT_POINT_EQ(FloatPoint(50, 62), visualViewport.viewportToRootFrame(
- FloatPoint(80, 100)));
+ EXPECT_FLOAT_POINT_EQ(
+ FloatPoint(50, 62),
+ visualViewport.viewportToRootFrame(FloatPoint(80, 100)));
EXPECT_FLOAT_POINT_EQ(FloatPoint(80, 100),
visualViewport.rootFrameToViewport(FloatPoint(50, 62)));
}

Powered by Google App Engine
This is Rietveld 408576698