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

Side by Side Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/VisualViewport.h" 5 #include "core/frame/VisualViewport.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/BrowserControls.h" 8 #include "core/frame/BrowserControls.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 EXPECT_SIZE_EQ(FloatSize(50, 60), visualViewport.GetScrollOffset()); 782 EXPECT_SIZE_EQ(FloatSize(50, 60), visualViewport.GetScrollOffset());
783 EXPECT_EQ(2, visualViewport.Scale()); 783 EXPECT_EQ(2, visualViewport.Scale());
784 784
785 // Navigate again, this time the FrameView should be smaller. 785 // Navigate again, this time the FrameView should be smaller.
786 registerMockedHttpURLLoad("viewport-device-width.html"); 786 registerMockedHttpURLLoad("viewport-device-width.html");
787 navigateTo(m_baseURL + "viewport-device-width.html"); 787 navigateTo(m_baseURL + "viewport-device-width.html");
788 788
789 // Ensure the scroll layer matches the frame view's size. 789 // Ensure the scroll layer matches the frame view's size.
790 EXPECT_SIZE_EQ(FloatSize(320, 240), visualViewport.ScrollLayer()->Size()); 790 EXPECT_SIZE_EQ(FloatSize(320, 240), visualViewport.ScrollLayer()->Size());
791 791
792 EXPECT_EQ(static_cast<int>(CompositorSubElementId::kViewport), 792 EXPECT_EQ(static_cast<unsigned long long>(CompositorSubElementId::kViewport),
ajuma 2017/05/05 13:46:42 uint64_t?
chrishtr 2017/05/05 15:37:47 Done.
793 visualViewport.ScrollLayer()->GetElementId().secondaryId); 793 SubElementIdFromCompositorElementId(
794 visualViewport.ScrollLayer()->GetElementId()));
794 795
795 // Ensure the location and scale were reset. 796 // Ensure the location and scale were reset.
796 EXPECT_SIZE_EQ(FloatSize(), visualViewport.GetScrollOffset()); 797 EXPECT_SIZE_EQ(FloatSize(), visualViewport.GetScrollOffset());
797 EXPECT_EQ(1, visualViewport.Scale()); 798 EXPECT_EQ(1, visualViewport.Scale());
798 } 799 }
799 800
800 // The main FrameView's size should be set such that its the size of the visual 801 // The main FrameView's size should be set such that its the size of the visual
801 // viewport at minimum scale. Test that the FrameView is appropriately sized in 802 // viewport at minimum scale. Test that the FrameView is appropriately sized in
802 // the presence of a viewport <meta> tag. 803 // the presence of a viewport <meta> tag.
803 TEST_P(VisualViewportTest, TestFrameViewSizedToViewportMetaMinimumScale) { 804 TEST_P(VisualViewportTest, TestFrameViewSizedToViewportMetaMinimumScale) {
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 " body {" 2449 " body {"
2449 " margin: 0px;" 2450 " margin: 0px;"
2450 " }" 2451 " }"
2451 " div { height:110vh; width: 110vw; }" 2452 " div { height:110vh; width: 110vw; }"
2452 "</style>" 2453 "</style>"
2453 "<div></div>", 2454 "<div></div>",
2454 baseURL); 2455 baseURL);
2455 } 2456 }
2456 2457
2457 } // namespace 2458 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698