| 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 #if defined(THREAD_SANITIZER) | 992 #if defined(THREAD_SANITIZER) |
| 993 #define MAYBE_BackForwardNotStale DISABLED_BackForwardNotStale | 993 #define MAYBE_BackForwardNotStale DISABLED_BackForwardNotStale |
| 994 #else | 994 #else |
| 995 #define MAYBE_BackForwardNotStale BackForwardNotStale | 995 #define MAYBE_BackForwardNotStale BackForwardNotStale |
| 996 #endif | 996 #endif |
| 997 // Test for http://crbug.com/93427. Ensure that cross-site navigations | 997 // Test for http://crbug.com/93427. Ensure that cross-site navigations |
| 998 // do not cause back/forward navigations to be considered stale by the | 998 // do not cause back/forward navigations to be considered stale by the |
| 999 // renderer. | 999 // renderer. |
| 1000 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, MAYBE_BackForwardNotStale) { | 1000 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, MAYBE_BackForwardNotStale) { |
| 1001 StartServer(); | 1001 StartServer(); |
| 1002 NavigateToURL(shell(), GURL(kAboutBlankURL)); | 1002 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); |
| 1003 | 1003 |
| 1004 // Visit a page on first site. | 1004 // Visit a page on first site. |
| 1005 NavigateToURL(shell(), test_server()->GetURL("files/title1.html")); | 1005 NavigateToURL(shell(), test_server()->GetURL("files/title1.html")); |
| 1006 | 1006 |
| 1007 // Visit three pages on second site. | 1007 // Visit three pages on second site. |
| 1008 NavigateToURL(shell(), GetCrossSiteURL("files/title1.html")); | 1008 NavigateToURL(shell(), GetCrossSiteURL("files/title1.html")); |
| 1009 NavigateToURL(shell(), GetCrossSiteURL("files/title2.html")); | 1009 NavigateToURL(shell(), GetCrossSiteURL("files/title2.html")); |
| 1010 NavigateToURL(shell(), GetCrossSiteURL("files/title3.html")); | 1010 NavigateToURL(shell(), GetCrossSiteURL("files/title3.html")); |
| 1011 | 1011 |
| 1012 // History is now [blank, A1, B1, B2, *B3]. | 1012 // History is now [blank, A1, B1, B2, *B3]. |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 // Navigate to url1 and check bindings. | 1456 // Navigate to url1 and check bindings. |
| 1457 NavigateToURL(new_shell, url1); | 1457 NavigateToURL(new_shell, url1); |
| 1458 // The navigation should have used the first SiteInstance, otherwise | 1458 // The navigation should have used the first SiteInstance, otherwise |
| 1459 // |initial_rvh| did not have a chance to be used. | 1459 // |initial_rvh| did not have a chance to be used. |
| 1460 EXPECT_EQ(new_web_contents->GetSiteInstance(), site_instance1); | 1460 EXPECT_EQ(new_web_contents->GetSiteInstance(), site_instance1); |
| 1461 EXPECT_EQ(BINDINGS_POLICY_WEB_UI, | 1461 EXPECT_EQ(BINDINGS_POLICY_WEB_UI, |
| 1462 new_web_contents->GetRenderViewHost()->GetEnabledBindings()); | 1462 new_web_contents->GetRenderViewHost()->GetEnabledBindings()); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| 1465 } // namespace content | 1465 } // namespace content |
| OLD | NEW |