| 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" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "content/browser/child_process_security_policy_impl.h" | 13 #include "content/browser/child_process_security_policy_impl.h" |
| 14 #include "content/browser/renderer_host/render_view_host_impl.h" | 14 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 15 #include "content/browser/site_instance_impl.h" | 15 #include "content/browser/site_instance_impl.h" |
| 16 #include "content/browser/web_contents/web_contents_impl.h" | 16 #include "content/browser/web_contents/web_contents_impl.h" |
| 17 #include "content/browser/webui/web_ui_impl.h" | 17 #include "content/browser/webui/web_ui_impl.h" |
| 18 #include "content/common/content_constants_internal.h" | 18 #include "content/common/content_constants_internal.h" |
| 19 #include "content/public/browser/navigation_controller.h" | 19 #include "content/public/browser/navigation_controller.h" |
| 20 #include "content/public/browser/navigation_entry.h" | 20 #include "content/public/browser/navigation_entry.h" |
| 21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 24 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 25 #include "content/public/common/url_constants.h" | 25 #include "content/public/common/url_constants.h" |
| 26 #include "content/public/test/browser_test_utils.h" | 26 #include "content/public/test/browser_test_utils.h" |
| 27 #include "content/public/test/content_browser_test.h" |
| 28 #include "content/public/test/content_browser_test_utils.h" |
| 27 #include "content/public/test/test_navigation_observer.h" | 29 #include "content/public/test/test_navigation_observer.h" |
| 28 #include "content/public/test/test_utils.h" | 30 #include "content/public/test/test_utils.h" |
| 29 #include "content/shell/browser/shell.h" | 31 #include "content/shell/browser/shell.h" |
| 30 #include "content/test/content_browser_test.h" | |
| 31 #include "content/test/content_browser_test_utils.h" | |
| 32 #include "net/base/net_util.h" | 32 #include "net/base/net_util.h" |
| 33 #include "net/dns/mock_host_resolver.h" | 33 #include "net/dns/mock_host_resolver.h" |
| 34 #include "net/test/spawned_test_server/spawned_test_server.h" | 34 #include "net/test/spawned_test_server/spawned_test_server.h" |
| 35 | 35 |
| 36 using base::ASCIIToUTF16; | 36 using base::ASCIIToUTF16; |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| 39 | 39 |
| 40 class RenderFrameHostManagerTest : public ContentBrowserTest { | 40 class RenderFrameHostManagerTest : public ContentBrowserTest { |
| 41 public: | 41 public: |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 // Go back and ensure we have no WebUI bindings. | 1399 // Go back and ensure we have no WebUI bindings. |
| 1400 TestNavigationObserver back_nav_load_observer(shell()->web_contents()); | 1400 TestNavigationObserver back_nav_load_observer(shell()->web_contents()); |
| 1401 shell()->web_contents()->GetController().GoBack(); | 1401 shell()->web_contents()->GetController().GoBack(); |
| 1402 back_nav_load_observer.Wait(); | 1402 back_nav_load_observer.Wait(); |
| 1403 EXPECT_EQ(original_url, shell()->web_contents()->GetLastCommittedURL()); | 1403 EXPECT_EQ(original_url, shell()->web_contents()->GetLastCommittedURL()); |
| 1404 EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 1404 EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
| 1405 shell()->web_contents()->GetRenderProcessHost()->GetID())); | 1405 shell()->web_contents()->GetRenderProcessHost()->GetID())); |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 } // namespace content | 1408 } // namespace content |
| OLD | NEW |