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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" | 10 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 // Start a navigation to a new site. | 1862 // Start a navigation to a new site. |
1863 controller().LoadURL( | 1863 controller().LoadURL( |
1864 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); | 1864 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); |
1865 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1865 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1866 switches::kEnableBrowserSideNavigation)) { | 1866 switches::kEnableBrowserSideNavigation)) { |
1867 rfh1->PrepareForCommit(); | 1867 rfh1->PrepareForCommit(); |
1868 } | 1868 } |
1869 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); | 1869 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); |
1870 | 1870 |
1871 // Simulate the unresponsiveness timer. The tab should close. | 1871 // Simulate the unresponsiveness timer. The tab should close. |
1872 contents()->RendererUnresponsive(rfh1->render_view_host()); | 1872 contents()->RendererUnresponsive(rfh1->render_view_host()->GetWidget()); |
1873 EXPECT_TRUE(close_delegate.is_closed()); | 1873 EXPECT_TRUE(close_delegate.is_closed()); |
1874 } | 1874 } |
1875 | 1875 |
1876 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is | 1876 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is |
1877 // received. (SwapOut and the corresponding ACK always occur after commit.) | 1877 // received. (SwapOut and the corresponding ACK always occur after commit.) |
1878 // Also tests that an early SwapOutACK is properly ignored. | 1878 // Also tests that an early SwapOutACK is properly ignored. |
1879 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { | 1879 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { |
1880 const GURL kUrl1("http://www.google.com/"); | 1880 const GURL kUrl1("http://www.google.com/"); |
1881 const GURL kUrl2("http://www.chromium.org/"); | 1881 const GURL kUrl2("http://www.chromium.org/"); |
1882 | 1882 |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2649 root->render_manager()->GetRenderFrameProxyHost(hostC->GetSiteInstance()); | 2649 root->render_manager()->GetRenderFrameProxyHost(hostC->GetSiteInstance()); |
2650 EXPECT_TRUE(proxy); | 2650 EXPECT_TRUE(proxy); |
2651 | 2651 |
2652 // Since the B->C navigation happened while the current page was focused, | 2652 // Since the B->C navigation happened while the current page was focused, |
2653 // page focus should propagate to the new subframe process. Check that | 2653 // page focus should propagate to the new subframe process. Check that |
2654 // process C received the proper focus message. | 2654 // process C received the proper focus message. |
2655 VerifyPageFocusMessage(hostC->GetProcess(), true, proxy->GetRoutingID()); | 2655 VerifyPageFocusMessage(hostC->GetProcess(), true, proxy->GetRoutingID()); |
2656 } | 2656 } |
2657 | 2657 |
2658 } // namespace content | 2658 } // namespace content |
OLD | NEW |