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

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

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 EXPECT_SIZE_EQ(FloatSize(50, 60), visual_viewport.GetScrollOffset()); 774 EXPECT_SIZE_EQ(FloatSize(50, 60), visual_viewport.GetScrollOffset());
775 EXPECT_EQ(2, visual_viewport.Scale()); 775 EXPECT_EQ(2, visual_viewport.Scale());
776 776
777 // Navigate again, this time the FrameView should be smaller. 777 // Navigate again, this time the FrameView should be smaller.
778 RegisterMockedHttpURLLoad("viewport-device-width.html"); 778 RegisterMockedHttpURLLoad("viewport-device-width.html");
779 NavigateTo(base_url_ + "viewport-device-width.html"); 779 NavigateTo(base_url_ + "viewport-device-width.html");
780 780
781 // Ensure the scroll layer matches the frame view's size. 781 // Ensure the scroll layer matches the frame view's size.
782 EXPECT_SIZE_EQ(FloatSize(320, 240), visual_viewport.ScrollLayer()->Size()); 782 EXPECT_SIZE_EQ(FloatSize(320, 240), visual_viewport.ScrollLayer()->Size());
783 783
784 EXPECT_EQ(CompositorSubElementId::kViewport, 784 EXPECT_EQ(CompositorElementIdNamespace::kViewport,
785 SubElementIdFromCompositorElementId( 785 NamespaceFromCompositorElementId(
786 visual_viewport.ScrollLayer()->GetElementId())); 786 visual_viewport.ScrollLayer()->GetElementId()));
787 787
788 // Ensure the location and scale were reset. 788 // Ensure the location and scale were reset.
789 EXPECT_SIZE_EQ(FloatSize(), visual_viewport.GetScrollOffset()); 789 EXPECT_SIZE_EQ(FloatSize(), visual_viewport.GetScrollOffset());
790 EXPECT_EQ(1, visual_viewport.Scale()); 790 EXPECT_EQ(1, visual_viewport.Scale());
791 } 791 }
792 792
793 // The main FrameView's size should be set such that its the size of the visual 793 // The main FrameView's size should be set such that its the size of the visual
794 // viewport at minimum scale. Test that the FrameView is appropriately sized in 794 // viewport at minimum scale. Test that the FrameView is appropriately sized in
795 // the presence of a viewport <meta> tag. 795 // the presence of a viewport <meta> tag.
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2455 " margin: 0px;" 2455 " margin: 0px;"
2456 " }" 2456 " }"
2457 " div { height:110vh; width: 110vw; }" 2457 " div { height:110vh; width: 110vw; }"
2458 "</style>" 2458 "</style>"
2459 "<div></div>", 2459 "<div></div>",
2460 base_url); 2460 base_url);
2461 } 2461 }
2462 2462
2463 } // namespace 2463 } // namespace
2464 } // namespace blink 2464 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LinkHighlightImpl.cpp ('k') | third_party/WebKit/public/platform/WebScrollbarLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698