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" |
11 #include "content/common/view_messages.h" | 11 #include "content/common/view_messages.h" |
12 #include "content/public/browser/overscroll_configuration.h" | 12 #include "content/public/browser/overscroll_configuration.h" |
13 #include "content/public/test/mock_render_process_host.h" | 13 #include "content/public/test/mock_render_process_host.h" |
14 #include "content/test/test_render_frame_host.h" | 14 #include "content/test/test_render_frame_host.h" |
15 #include "content/test/test_render_view_host.h" | 15 #include "content/test/test_render_view_host.h" |
16 #include "content/test/test_web_contents.h" | 16 #include "content/test/test_web_contents.h" |
17 #include "ui/aura/test/test_windows.h" | 17 #include "ui/aura/test/test_windows.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura_extra/image_window_delegate.h" | 19 #include "ui/aura_extra/image_window_delegate.h" |
20 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 20 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
21 #include "ui/compositor/scoped_layer_animation_settings.h" | 21 #include "ui/compositor/scoped_layer_animation_settings.h" |
22 #include "ui/compositor/test/layer_animator_test_controller.h" | 22 #include "ui/compositor/test/layer_animator_test_controller.h" |
23 #include "ui/events/gesture_detection/gesture_configuration.h" | 23 #include "ui/events/gesture_detection/gesture_configuration.h" |
24 #include "ui/events/test/event_generator.h" | 24 #include "ui/events/test/event_generator.h" |
25 #include "ui/gfx/codec/png_codec.h" | 25 #include "ui/gfx/codec/png_codec.h" |
26 #include "ui/gfx/frame_time.h" | |
27 | 26 |
28 namespace content { | 27 namespace content { |
29 | 28 |
30 // A subclass of TestWebContents that offers a fake content window. | 29 // A subclass of TestWebContents that offers a fake content window. |
31 class OverscrollTestWebContents : public TestWebContents { | 30 class OverscrollTestWebContents : public TestWebContents { |
32 public: | 31 public: |
33 ~OverscrollTestWebContents() override {} | 32 ~OverscrollTestWebContents() override {} |
34 | 33 |
35 static OverscrollTestWebContents* Create( | 34 static OverscrollTestWebContents* Create( |
36 BrowserContext* browser_context, | 35 BrowserContext* browser_context, |
(...skipping 336 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 |