| OLD | NEW |
| 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 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 // Tests that when a new frame is created, it is created with the intended size | 1793 // Tests that when a new frame is created, it is created with the intended size |
| 1794 // (i.e. viewport at minimum scale, 100x200 / 0.5). | 1794 // (i.e. viewport at minimum scale, 100x200 / 0.5). |
| 1795 TEST_P(VisualViewportTest, TestMainFrameInitializationSizing) { | 1795 TEST_P(VisualViewportTest, TestMainFrameInitializationSizing) { |
| 1796 InitializeWithAndroidSettings(); | 1796 InitializeWithAndroidSettings(); |
| 1797 | 1797 |
| 1798 WebViewImpl()->Resize(IntSize(100, 200)); | 1798 WebViewImpl()->Resize(IntSize(100, 200)); |
| 1799 | 1799 |
| 1800 RegisterMockedHttpURLLoad("content-width-1000-min-scale.html"); | 1800 RegisterMockedHttpURLLoad("content-width-1000-min-scale.html"); |
| 1801 NavigateTo(base_url_ + "content-width-1000-min-scale.html"); | 1801 NavigateTo(base_url_ + "content-width-1000-min-scale.html"); |
| 1802 | 1802 |
| 1803 WebLocalFrameImpl* local_frame = WebViewImpl()->MainFrameImpl(); | 1803 WebLocalFrameBase* local_frame = WebViewImpl()->MainFrameImpl(); |
| 1804 // The shutdown() calls are a hack to prevent this test from violating | 1804 // The shutdown() calls are a hack to prevent this test from violating |
| 1805 // invariants about frame state during navigation/detach. | 1805 // invariants about frame state during navigation/detach. |
| 1806 local_frame->GetFrame()->GetDocument()->Shutdown(); | 1806 local_frame->GetFrame()->GetDocument()->Shutdown(); |
| 1807 local_frame->CreateFrameView(); | 1807 local_frame->CreateFrameView(); |
| 1808 | 1808 |
| 1809 FrameView& frame_view = *local_frame->GetFrameView(); | 1809 FrameView& frame_view = *local_frame->GetFrameView(); |
| 1810 EXPECT_SIZE_EQ(IntSize(200, 400), frame_view.FrameRect().Size()); | 1810 EXPECT_SIZE_EQ(IntSize(200, 400), frame_view.FrameRect().Size()); |
| 1811 frame_view.Dispose(); | 1811 frame_view.Dispose(); |
| 1812 } | 1812 } |
| 1813 | 1813 |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2453 " margin: 0px;" | 2453 " margin: 0px;" |
| 2454 " }" | 2454 " }" |
| 2455 " div { height:110vh; width: 110vw; }" | 2455 " div { height:110vh; width: 110vw; }" |
| 2456 "</style>" | 2456 "</style>" |
| 2457 "<div></div>", | 2457 "<div></div>", |
| 2458 base_url); | 2458 base_url); |
| 2459 } | 2459 } |
| 2460 | 2460 |
| 2461 } // namespace | 2461 } // namespace |
| 2462 } // namespace blink | 2462 } // namespace blink |
| OLD | NEW |