| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/stl_util.h" | 6 #include "base/stl_util.h" |
| 7 #include "base/string16.h" | 7 #include "base/string16.h" |
| 8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
| 9 #include "content/browser/browsing_instance.h" | 9 #include "content/browser/browsing_instance.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| 11 #include "content/browser/mock_content_browser_client.h" | 11 #include "content/browser/mock_content_browser_client.h" |
| 12 #include "content/browser/renderer_host/render_process_host_impl.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 13 #include "content/browser/renderer_host/render_view_host_impl.h" | 13 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 14 #include "content/browser/renderer_host/test_render_view_host.h" | 14 #include "content/browser/renderer_host/test_render_view_host.h" |
| 15 #include "content/browser/site_instance_impl.h" | 15 #include "content/browser/site_instance_impl.h" |
| 16 #include "content/browser/tab_contents/navigation_entry_impl.h" | |
| 17 #include "content/browser/tab_contents/tab_contents.h" | 16 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/browser/web_contents/navigation_entry_impl.h" |
| 18 #include "content/public/browser/web_ui_controller_factory.h" | 18 #include "content/public/browser/web_ui_controller_factory.h" |
| 19 #include "content/public/common/content_client.h" | 19 #include "content/public/common/content_client.h" |
| 20 #include "content/public/common/content_constants.h" | 20 #include "content/public/common/content_constants.h" |
| 21 #include "content/public/common/url_constants.h" | 21 #include "content/public/common/url_constants.h" |
| 22 #include "content/test/mock_render_process_host.h" | 22 #include "content/test/mock_render_process_host.h" |
| 23 #include "content/test/test_browser_context.h" | 23 #include "content/test/test_browser_context.h" |
| 24 #include "content/test/test_content_client.h" | 24 #include "content/test/test_content_client.h" |
| 25 #include "googleurl/src/url_util.h" | 25 #include "googleurl/src/url_util.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 host.reset(instance->GetProcess()); | 614 host.reset(instance->GetProcess()); |
| 615 EXPECT_TRUE(host.get() != NULL); | 615 EXPECT_TRUE(host.get() != NULL); |
| 616 EXPECT_TRUE(instance->HasProcess()); | 616 EXPECT_TRUE(instance->HasProcess()); |
| 617 | 617 |
| 618 EXPECT_FALSE(instance->HasWrongProcessForURL(GURL("http://evernote.com"))); | 618 EXPECT_FALSE(instance->HasWrongProcessForURL(GURL("http://evernote.com"))); |
| 619 EXPECT_FALSE(instance->HasWrongProcessForURL( | 619 EXPECT_FALSE(instance->HasWrongProcessForURL( |
| 620 GURL("javascript:alert(document.location.href);"))); | 620 GURL("javascript:alert(document.location.href);"))); |
| 621 | 621 |
| 622 EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); | 622 EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); |
| 623 } | 623 } |
| OLD | NEW |