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 "content/browser/web_contents/aura/overscroll_navigation_overlay.h" | 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h" |
6 | 6 |
7 #include "content/browser/frame_host/navigation_entry_impl.h" | 7 #include "content/browser/frame_host/navigation_entry_impl.h" |
8 #include "content/browser/web_contents/aura/image_window_delegate.h" | 8 #include "content/browser/web_contents/aura/image_window_delegate.h" |
9 #include "content/browser/web_contents/web_contents_view.h" | 9 #include "content/browser/web_contents/web_contents_view.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 const GURL first("https://www.google.com"); | 67 const GURL first("https://www.google.com"); |
68 contents()->NavigateAndCommit(first); | 68 contents()->NavigateAndCommit(first); |
69 EXPECT_TRUE(controller().GetVisibleEntry()); | 69 EXPECT_TRUE(controller().GetVisibleEntry()); |
70 EXPECT_FALSE(controller().CanGoBack()); | 70 EXPECT_FALSE(controller().CanGoBack()); |
71 | 71 |
72 const GURL second("http://www.chromium.org"); | 72 const GURL second("http://www.chromium.org"); |
73 contents()->NavigateAndCommit(second); | 73 contents()->NavigateAndCommit(second); |
74 EXPECT_TRUE(controller().CanGoBack()); | 74 EXPECT_TRUE(controller().CanGoBack()); |
75 | 75 |
76 // Turn on compositing. | |
77 ViewHostMsg_DidActivateAcceleratedCompositing msg( | |
78 test_rvh()->GetRoutingID(), true); | |
79 RenderViewHostTester::TestOnMessageReceived(test_rvh(), msg); | |
80 | |
81 // Receive a paint update. This is necessary to make sure the size is set | 76 // Receive a paint update. This is necessary to make sure the size is set |
82 // correctly in RenderWidgetHostImpl. | 77 // correctly in RenderWidgetHostImpl. |
83 ViewHostMsg_UpdateRect_Params params; | 78 ViewHostMsg_UpdateRect_Params params; |
84 memset(¶ms, 0, sizeof(params)); | 79 memset(¶ms, 0, sizeof(params)); |
85 params.view_size = gfx::Size(10, 10); | 80 params.view_size = gfx::Size(10, 10); |
86 ViewHostMsg_UpdateRect rect(test_rvh()->GetRoutingID(), params); | 81 ViewHostMsg_UpdateRect rect(test_rvh()->GetRoutingID(), params); |
87 RenderViewHostTester::TestOnMessageReceived(test_rvh(), rect); | 82 RenderViewHostTester::TestOnMessageReceived(test_rvh(), rect); |
88 | 83 |
89 // Reset pending flags for size/paint. | 84 // Reset pending flags for size/paint. |
90 test_rvh()->ResetSizeAndRepaintPendingFlags(); | 85 test_rvh()->ResetSizeAndRepaintPendingFlags(); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // Navigation was committed and the load update was received - the flag | 210 // Navigation was committed and the load update was received - the flag |
216 // should now be updated. | 211 // should now be updated. |
217 EXPECT_TRUE(GetOverlay()->loading_complete_); | 212 EXPECT_TRUE(GetOverlay()->loading_complete_); |
218 | 213 |
219 EXPECT_TRUE(GetOverlay()->web_contents()); | 214 EXPECT_TRUE(GetOverlay()->web_contents()); |
220 ReceivePaintUpdate(); | 215 ReceivePaintUpdate(); |
221 EXPECT_FALSE(GetOverlay()->web_contents()); | 216 EXPECT_FALSE(GetOverlay()->web_contents()); |
222 } | 217 } |
223 | 218 |
224 } // namespace content | 219 } // namespace content |
OLD | NEW |