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

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

Issue 2443633002: Avoid element id collisions with the visual viewport (Closed)
Patch Set: Created 4 years, 2 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 6a06e377bfc6ef12e09ece72292c01455913fcd9..6ca44f3a36a16881c4c3b0832e612e3c0b6234b1 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -19,6 +19,7 @@
#include "platform/PlatformGestureEvent.h"
#include "platform/geometry/DoublePoint.h"
#include "platform/geometry/DoubleRect.h"
+#include "platform/graphics/CompositorElementId.h"
#include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h"
#include "platform/testing/URLTestHelpers.h"
#include "public/platform/Platform.h"
@@ -783,6 +784,9 @@ TEST_P(ParameterizedVisualViewportTest,
// Ensure the scroll layer matches the frame view's size.
EXPECT_SIZE_EQ(FloatSize(320, 240), visualViewport.scrollLayer()->size());
+ EXPECT_EQ(static_cast<int>(CompositorSubElementId::Viewport,
+ visualViewport.scrollLayer()->elementId().secondaryId);
+
// Ensure the location and scale were reset.
EXPECT_SIZE_EQ(FloatSize(), visualViewport.scrollOffset());
EXPECT_EQ(1, visualViewport.scale());

Powered by Google App Engine
This is Rietveld 408576698