| 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 "content/browser/frame_host/navigation_entry_impl.h" | 8 #include "content/browser/frame_host/navigation_entry_impl.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/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 ~OverscrollTestWebContents() override {} | 33 ~OverscrollTestWebContents() override {} |
| 34 | 34 |
| 35 static OverscrollTestWebContents* Create( | 35 static OverscrollTestWebContents* Create( |
| 36 BrowserContext* browser_context, | 36 BrowserContext* browser_context, |
| 37 SiteInstance* instance, | 37 SiteInstance* instance, |
| 38 scoped_ptr<aura::Window> fake_native_view, | 38 scoped_ptr<aura::Window> fake_native_view, |
| 39 scoped_ptr<aura::Window> fake_contents_window) { | 39 scoped_ptr<aura::Window> fake_contents_window) { |
| 40 OverscrollTestWebContents* web_contents = new OverscrollTestWebContents( | 40 OverscrollTestWebContents* web_contents = new OverscrollTestWebContents( |
| 41 browser_context, fake_native_view.Pass(), fake_contents_window.Pass()); | 41 browser_context, fake_native_view.Pass(), fake_contents_window.Pass()); |
| 42 web_contents->Init(WebContents::CreateParams(browser_context, instance)); | 42 web_contents->Init(WebContents::CreateParams(browser_context, instance)); |
| 43 web_contents->RenderFrameCreated(web_contents->GetMainFrame()); | |
| 44 return web_contents; | 43 return web_contents; |
| 45 } | 44 } |
| 46 | 45 |
| 47 gfx::NativeView GetNativeView() override { return fake_native_view_.get(); } | 46 gfx::NativeView GetNativeView() override { return fake_native_view_.get(); } |
| 48 | 47 |
| 49 gfx::NativeView GetContentNativeView() override { | 48 gfx::NativeView GetContentNativeView() override { |
| 50 return fake_contents_window_.get(); | 49 return fake_contents_window_.get(); |
| 51 } | 50 } |
| 52 | 51 |
| 53 protected: | 52 protected: |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 EXPECT_TRUE(GetOverlay()->window_.get()); | 372 EXPECT_TRUE(GetOverlay()->window_.get()); |
| 374 | 373 |
| 375 // Load the page. | 374 // Load the page. |
| 376 contents()->CommitPendingNavigation(); | 375 contents()->CommitPendingNavigation(); |
| 377 ReceivePaintUpdate(); | 376 ReceivePaintUpdate(); |
| 378 EXPECT_FALSE(GetOverlay()->window_.get()); | 377 EXPECT_FALSE(GetOverlay()->window_.get()); |
| 379 EXPECT_EQ(contents()->GetURL(), first()); | 378 EXPECT_EQ(contents()->GetURL(), first()); |
| 380 } | 379 } |
| 381 | 380 |
| 382 } // namespace content | 381 } // namespace content |
| OLD | NEW |