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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 shell()->web_contents()->GetSiteInstance()); | 1612 shell()->web_contents()->GetSiteInstance()); |
1613 } | 1613 } |
1614 | 1614 |
1615 // Ensure that renderer-side debug URLs do not cause a process swap, since they | 1615 // Ensure that renderer-side debug URLs do not cause a process swap, since they |
1616 // are meant to run in the current page. We had a bug where we expected a | 1616 // are meant to run in the current page. We had a bug where we expected a |
1617 // BrowsingInstance swap to occur on pages like view-source and extensions, | 1617 // BrowsingInstance swap to occur on pages like view-source and extensions, |
1618 // which broke chrome://crash and javascript: URLs. | 1618 // which broke chrome://crash and javascript: URLs. |
1619 // See http://crbug.com/335503. | 1619 // See http://crbug.com/335503. |
1620 // The test fails on Mac OSX with ASAN. | 1620 // The test fails on Mac OSX with ASAN. |
1621 // See http://crbug.com/699062. | 1621 // See http://crbug.com/699062. |
1622 #if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER) | 1622 #if defined(OS_MACOSX) && defined(THREAD_SANITIZER) |
1623 #define MAYBE_RendererDebugURLsDontSwap DISABLED_RendererDebugURLsDontSwap | 1623 #define MAYBE_RendererDebugURLsDontSwap DISABLED_RendererDebugURLsDontSwap |
1624 #else | 1624 #else |
1625 #define MAYBE_RendererDebugURLsDontSwap RendererDebugURLsDontSwap | 1625 #define MAYBE_RendererDebugURLsDontSwap RendererDebugURLsDontSwap |
1626 #endif | 1626 #endif |
1627 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, | 1627 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, |
1628 MAYBE_RendererDebugURLsDontSwap) { | 1628 MAYBE_RendererDebugURLsDontSwap) { |
1629 StartEmbeddedServer(); | 1629 StartEmbeddedServer(); |
1630 | 1630 |
1631 GURL original_url(embedded_test_server()->GetURL("/title2.html")); | 1631 GURL original_url(embedded_test_server()->GetURL("/title2.html")); |
1632 GURL view_source_url(kViewSourceScheme + std::string(":") + | 1632 GURL view_source_url(kViewSourceScheme + std::string(":") + |
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3274 // than one ancestor has the same URL (excluding fragments), and the | 3274 // than one ancestor has the same URL (excluding fragments), and the |
3275 // navigating frame's current URL shouldn't count toward that. | 3275 // navigating frame's current URL shouldn't count toward that. |
3276 EXPECT_TRUE( | 3276 EXPECT_TRUE( |
3277 ExecuteScript(child, "location.href = '" + first_url.spec() + "';")); | 3277 ExecuteScript(child, "location.href = '" + first_url.spec() + "';")); |
3278 observer2.Wait(); | 3278 observer2.Wait(); |
3279 | 3279 |
3280 EXPECT_EQ(child->current_url(), first_url); | 3280 EXPECT_EQ(child->current_url(), first_url); |
3281 } | 3281 } |
3282 | 3282 |
3283 } // namespace content | 3283 } // namespace content |
OLD | NEW |