OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/values.h" | 5 #include "base/values.h" |
6 #include "content/browser/frame_host/navigation_entry_impl.h" | 6 #include "content/browser/frame_host/navigation_entry_impl.h" |
7 #include "content/browser/web_contents/web_contents_impl.h" | 7 #include "content/browser/web_contents/web_contents_impl.h" |
8 #include "content/public/browser/load_notification_details.h" | 8 #include "content/public/browser/load_notification_details.h" |
9 #include "content/public/browser/navigation_controller.h" | 9 #include "content/public/browser/navigation_controller.h" |
10 #include "content/public/browser/notification_details.h" | 10 #include "content/public/browser/notification_details.h" |
11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
12 #include "content/public/browser/notification_types.h" | 12 #include "content/public/browser/notification_types.h" |
13 #include "content/public/browser/render_view_host.h" | 13 #include "content/public/browser/render_view_host.h" |
14 #include "content/public/browser/render_widget_host_view.h" | 14 #include "content/public/browser/render_widget_host_view.h" |
15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
16 #include "content/public/browser/web_contents_view.h" | 16 #include "content/public/browser/web_contents_view.h" |
17 #include "content/public/common/content_paths.h" | 17 #include "content/public/common/content_paths.h" |
18 #include "content/public/test/browser_test_utils.h" | 18 #include "content/public/test/browser_test_utils.h" |
| 19 #include "content/public/test/content_browser_test.h" |
| 20 #include "content/public/test/content_browser_test_utils.h" |
19 #include "content/public/test/test_utils.h" | 21 #include "content/public/test/test_utils.h" |
20 #include "content/shell/browser/shell.h" | 22 #include "content/shell/browser/shell.h" |
21 #include "content/test/content_browser_test.h" | |
22 #include "content/test/content_browser_test_utils.h" | |
23 #include "net/dns/mock_host_resolver.h" | 23 #include "net/dns/mock_host_resolver.h" |
24 #include "net/test/embedded_test_server/embedded_test_server.h" | 24 #include "net/test/embedded_test_server/embedded_test_server.h" |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 void ResizeWebContentsView(Shell* shell, const gfx::Size& size, | 28 void ResizeWebContentsView(Shell* shell, const gfx::Size& size, |
29 bool set_start_page) { | 29 bool set_start_page) { |
30 // Shell::SizeTo is not implemented on Aura; WebContentsView::SizeContents | 30 // Shell::SizeTo is not implemented on Aura; WebContentsView::SizeContents |
31 // works on Win and ChromeOS but not Linux - we need to resize the shell | 31 // works on Win and ChromeOS but not Linux - we need to resize the shell |
32 // window on Linux because if we don't, the next layout of the unchanged shell | 32 // window on Linux because if we don't, the next layout of the unchanged shell |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 RenderFrameCreatedObserver observer(shell()); | 381 RenderFrameCreatedObserver observer(shell()); |
382 NavigateToURL(shell(), cross_site_url); | 382 NavigateToURL(shell(), cross_site_url); |
383 | 383 |
384 // The observer should've seen a RenderFrameCreated call for the new frame | 384 // The observer should've seen a RenderFrameCreated call for the new frame |
385 // and not the old one. | 385 // and not the old one. |
386 EXPECT_NE(observer.last_rfh(), orig_rfh); | 386 EXPECT_NE(observer.last_rfh(), orig_rfh); |
387 EXPECT_EQ(observer.last_rfh(), shell()->web_contents()->GetMainFrame()); | 387 EXPECT_EQ(observer.last_rfh(), shell()->web_contents()->GetMainFrame()); |
388 } | 388 } |
389 | 389 |
390 } // namespace content | 390 } // namespace content |
OLD | NEW |