| 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 <vector> | 7 #include <vector> |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "content/browser/frame_host/navigation_entry_impl.h" | 9 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 10 #include "content/browser/web_contents/web_contents_view.h" | 10 #include "content/browser/web_contents/web_contents_view.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 // Receive a paint update. This is necessary to make sure the size is set | 187 // Receive a paint update. This is necessary to make sure the size is set |
| 188 // correctly in RenderWidgetHostImpl. | 188 // correctly in RenderWidgetHostImpl. |
| 189 ViewHostMsg_UpdateRect_Params params; | 189 ViewHostMsg_UpdateRect_Params params; |
| 190 memset(¶ms, 0, sizeof(params)); | 190 memset(¶ms, 0, sizeof(params)); |
| 191 params.view_size = gfx::Size(10, 10); | 191 params.view_size = gfx::Size(10, 10); |
| 192 ViewHostMsg_UpdateRect rect(test_rvh()->GetRoutingID(), params); | 192 ViewHostMsg_UpdateRect rect(test_rvh()->GetRoutingID(), params); |
| 193 RenderViewHostTester::TestOnMessageReceived(test_rvh(), rect); | 193 RenderViewHostTester::TestOnMessageReceived(test_rvh(), rect); |
| 194 | 194 |
| 195 // Reset pending flags for size/paint. | 195 // Reset pending flags for size/paint. |
| 196 test_rvh()->ResetSizeAndRepaintPendingFlags(); | 196 test_rvh()->GetWidget()->ResetSizeAndRepaintPendingFlags(); |
| 197 | 197 |
| 198 // Create the overlay, and set the contents of the overlay window. | 198 // Create the overlay, and set the contents of the overlay window. |
| 199 overlay_.reset(new OverscrollNavigationOverlay(contents(), root_window())); | 199 overlay_.reset(new OverscrollNavigationOverlay(contents(), root_window())); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void TearDown() override { | 202 void TearDown() override { |
| 203 overlay_.reset(); | 203 overlay_.reset(); |
| 204 RenderViewHostImplTestHarness::TearDown(); | 204 RenderViewHostImplTestHarness::TearDown(); |
| 205 } | 205 } |
| 206 | 206 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 EXPECT_TRUE(GetOverlay()->window_.get()); | 405 EXPECT_TRUE(GetOverlay()->window_.get()); |
| 406 | 406 |
| 407 // Load the page. | 407 // Load the page. |
| 408 contents()->CommitPendingNavigation(); | 408 contents()->CommitPendingNavigation(); |
| 409 ReceivePaintUpdate(); | 409 ReceivePaintUpdate(); |
| 410 EXPECT_FALSE(GetOverlay()->window_.get()); | 410 EXPECT_FALSE(GetOverlay()->window_.get()); |
| 411 EXPECT_EQ(contents()->GetURL(), first()); | 411 EXPECT_EQ(contents()->GetURL(), first()); |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace content | 414 } // namespace content |
| OLD | NEW |