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

Side by Side Diff: Source/web/tests/PinchViewportTest.cpp

Issue 639023004: Oilpan: move HistoryItem to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 6
7 #include "core/frame/PinchViewport.h" 7 #include "core/frame/PinchViewport.h"
8 8
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.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 frameView->setScrollOffset(IntPoint(0, 1000)); 774 frameView->setScrollOffset(IntPoint(0, 1000));
775 775
776 // The frameView should be 1000x1000 since the viewport meta width=1000 and 776 // The frameView should be 1000x1000 since the viewport meta width=1000 and
777 // the aspect ratio is 1:1. 777 // the aspect ratio is 1:1.
778 EXPECT_SIZE_EQ(IntSize(1000, 1000), frameView->frameRect().size()); 778 EXPECT_SIZE_EQ(IntSize(1000, 1000), frameView->frameRect().size());
779 779
780 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); 780 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport();
781 pinchViewport.setScale(2); 781 pinchViewport.setScale(2);
782 pinchViewport.setLocation(FloatPoint(950, 950)); 782 pinchViewport.setLocation(FloatPoint(950, 950));
783 783
784 RefPtr<HistoryItem> firstItem = webViewImpl()->mainFrameImpl()->frame()->loa der().currentItem(); 784 RefPtrWillBePersistent<HistoryItem> firstItem = webViewImpl()->mainFrameImpl ()->frame()->loader().currentItem();
785 EXPECT_POINT_EQ(IntPoint(0, 1000), firstItem->scrollPoint()); 785 EXPECT_POINT_EQ(IntPoint(0, 1000), firstItem->scrollPoint());
786 786
787 // Now navigate to a page which causes a smaller frameView. Make sure that 787 // Now navigate to a page which causes a smaller frameView. Make sure that
788 // navigating doesn't cause the history item to set a new scroll offset 788 // navigating doesn't cause the history item to set a new scroll offset
789 // before the item was replaced. 789 // before the item was replaced.
790 navigateTo("about:blank"); 790 navigateTo("about:blank");
791 frameView = webViewImpl()->mainFrameImpl()->frameView(); 791 frameView = webViewImpl()->mainFrameImpl()->frameView();
792 792
793 EXPECT_NE(firstItem, webViewImpl()->mainFrameImpl()->frame()->loader().curre ntItem()); 793 EXPECT_NE(firstItem, webViewImpl()->mainFrameImpl()->frame()->loader().curre ntItem());
794 EXPECT_LT(frameView->frameRect().size().width(), 1000); 794 EXPECT_LT(frameView->frameRect().size().width(), 1000);
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView(); 1167 FrameView& frameView = *webViewImpl()->mainFrameImpl()->frameView();
1168 WebLayer* scrollLayer = frameView.layerForScrolling()->platformLayer(); 1168 WebLayer* scrollLayer = frameView.layerForScrolling()->platformLayer();
1169 1169
1170 frameView.setContentsSize(IntSize(1500, 2400)); 1170 frameView.setContentsSize(IntSize(1500, 2400));
1171 frameView.updateLayoutAndStyleForPainting(); 1171 frameView.updateLayoutAndStyleForPainting();
1172 1172
1173 EXPECT_SIZE_EQ(IntSize(1500, 2400), IntSize(scrollLayer->bounds())); 1173 EXPECT_SIZE_EQ(IntSize(1500, 2400), IntSize(scrollLayer->bounds()));
1174 } 1174 }
1175 1175
1176 } // namespace 1176 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698