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/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 // Visit a WebUI page with bindings. | 1538 // Visit a WebUI page with bindings. |
1539 GURL webui_url(GURL(std::string(kChromeUIScheme) + "://" + | 1539 GURL webui_url(GURL(std::string(kChromeUIScheme) + "://" + |
1540 std::string(kChromeUIGpuHost))); | 1540 std::string(kChromeUIGpuHost))); |
1541 NavigateToURL(shell(), webui_url); | 1541 NavigateToURL(shell(), webui_url); |
1542 EXPECT_TRUE(ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 1542 EXPECT_TRUE(ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
1543 shell()->web_contents()->GetRenderProcessHost()->GetID())); | 1543 shell()->web_contents()->GetRenderProcessHost()->GetID())); |
1544 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( | 1544 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>( |
1545 shell()->web_contents()); | 1545 shell()->web_contents()); |
1546 WebUIImpl* webui = web_contents->GetRenderManagerForTesting()->web_ui(); | 1546 WebUIImpl* webui = web_contents->GetRenderManagerForTesting()->web_ui(); |
1547 EXPECT_TRUE(webui); | 1547 EXPECT_TRUE(webui); |
1548 EXPECT_FALSE(web_contents->GetRenderManagerForTesting()->pending_web_ui()); | 1548 EXPECT_FALSE( |
| 1549 web_contents->GetRenderManagerForTesting()->GetNavigatingWebUI()); |
1549 | 1550 |
1550 // Navigate to another WebUI URL that reuses the WebUI object. Make sure we | 1551 // Navigate to another WebUI URL that reuses the WebUI object. Make sure we |
1551 // clear pending_web_ui() when it commits. | 1552 // clear GetNavigatingWebUI() when it commits. |
1552 GURL webui_url2(webui_url.spec() + "#foo"); | 1553 GURL webui_url2(webui_url.spec() + "#foo"); |
1553 NavigateToURL(shell(), webui_url2); | 1554 NavigateToURL(shell(), webui_url2); |
1554 EXPECT_EQ(webui, web_contents->GetRenderManagerForTesting()->web_ui()); | 1555 EXPECT_EQ(webui, web_contents->GetRenderManagerForTesting()->web_ui()); |
1555 EXPECT_FALSE(web_contents->GetRenderManagerForTesting()->pending_web_ui()); | 1556 EXPECT_FALSE( |
| 1557 web_contents->GetRenderManagerForTesting()->GetNavigatingWebUI()); |
1556 } | 1558 } |
1557 | 1559 |
1558 class RFHMProcessPerTabTest : public RenderFrameHostManagerTest { | 1560 class RFHMProcessPerTabTest : public RenderFrameHostManagerTest { |
1559 public: | 1561 public: |
1560 RFHMProcessPerTabTest() {} | 1562 RFHMProcessPerTabTest() {} |
1561 | 1563 |
1562 void SetUpCommandLine(base::CommandLine* command_line) override { | 1564 void SetUpCommandLine(base::CommandLine* command_line) override { |
1563 command_line->AppendSwitch(switches::kProcessPerTab); | 1565 command_line->AppendSwitch(switches::kProcessPerTab); |
1564 } | 1566 } |
1565 }; | 1567 }; |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2207 popup_root->current_frame_host()->render_view_host()->IsRenderViewLive()); | 2209 popup_root->current_frame_host()->render_view_host()->IsRenderViewLive()); |
2208 | 2210 |
2209 // Navigate the main tab to the site of the popup. This will cause the | 2211 // Navigate the main tab to the site of the popup. This will cause the |
2210 // RenderView for b.com in the main tab to be recreated. If the issue | 2212 // RenderView for b.com in the main tab to be recreated. If the issue |
2211 // is not fixed, this will result in process crash and failing test. | 2213 // is not fixed, this will result in process crash and failing test. |
2212 EXPECT_TRUE(NavigateToURL( | 2214 EXPECT_TRUE(NavigateToURL( |
2213 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); | 2215 shell(), embedded_test_server()->GetURL("b.com", "/title3.html"))); |
2214 } | 2216 } |
2215 | 2217 |
2216 } // namespace content | 2218 } // namespace content |
OLD | NEW |