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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
10 #include "content/browser/browsing_instance.h" | 10 #include "content/browser/browsing_instance.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
30 | 30 |
31 using content::BrowserContext; | 31 using content::BrowserContext; |
32 using content::BrowserThread; | 32 using content::BrowserThread; |
33 using content::BrowserThreadImpl; | 33 using content::BrowserThreadImpl; |
34 using content::MockRenderProcessHost; | 34 using content::MockRenderProcessHost; |
35 using content::MockRenderProcessHostFactory; | 35 using content::MockRenderProcessHostFactory; |
36 using content::NavigationEntry; | 36 using content::NavigationEntry; |
37 using content::NavigationEntryImpl; | 37 using content::NavigationEntryImpl; |
38 using content::SiteInstance; | 38 using content::SiteInstance; |
| 39 using content::WebContentsImpl; |
39 using content::WebUI; | 40 using content::WebUI; |
40 using content::WebUIController; | 41 using content::WebUIController; |
41 | 42 |
42 namespace { | 43 namespace { |
43 | 44 |
44 const char kSameAsAnyInstanceURL[] = "about:internets"; | 45 const char kSameAsAnyInstanceURL[] = "about:internets"; |
45 | 46 |
46 const char kPrivilegedScheme[] = "privileged"; | 47 const char kPrivilegedScheme[] = "privileged"; |
47 | 48 |
48 class SiteInstanceTestWebUIControllerFactory | 49 class SiteInstanceTestWebUIControllerFactory |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 EXPECT_TRUE(instance->HasProcess()); | 679 EXPECT_TRUE(instance->HasProcess()); |
679 | 680 |
680 EXPECT_FALSE(instance->HasWrongProcessForURL(GURL("http://evernote.com"))); | 681 EXPECT_FALSE(instance->HasWrongProcessForURL(GURL("http://evernote.com"))); |
681 EXPECT_FALSE(instance->HasWrongProcessForURL( | 682 EXPECT_FALSE(instance->HasWrongProcessForURL( |
682 GURL("javascript:alert(document.location.href);"))); | 683 GURL("javascript:alert(document.location.href);"))); |
683 | 684 |
684 EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); | 685 EXPECT_TRUE(instance->HasWrongProcessForURL(GURL("chrome://settings"))); |
685 | 686 |
686 DrainMessageLoops(); | 687 DrainMessageLoops(); |
687 } | 688 } |
OLD | NEW |