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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 EXPECT_EQ(url, entry->GetVirtualURL()); | 66 EXPECT_EQ(url, entry->GetVirtualURL()); |
67 } | 67 } |
68 | 68 |
69 // Test that a basic navigation works in --site-per-process mode. This prevents | 69 // Test that a basic navigation works in --site-per-process mode. This prevents |
70 // regressions when that mode calls out into the ChromeContentBrowserClient, | 70 // regressions when that mode calls out into the ChromeContentBrowserClient, |
71 // such as http://crbug.com/164223. | 71 // such as http://crbug.com/164223. |
72 IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, | 72 IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, |
73 SitePerProcessNavigation) { | 73 SitePerProcessNavigation) { |
74 CommandLine::ForCurrentProcess()->AppendSwitch( | 74 CommandLine::ForCurrentProcess()->AppendSwitch( |
75 switches::kSitePerProcess); | 75 switches::kSitePerProcess); |
76 const GURL url(std::string("chrome://chrome/")); | 76 ASSERT_TRUE(test_server()->Start()); |
| 77 const GURL url(test_server()->GetURL("files/title1.html")); |
77 | 78 |
78 ui_test_utils::NavigateToURL(browser(), url); | 79 ui_test_utils::NavigateToURL(browser(), url); |
79 NavigationEntry* entry = GetLastCommittedEntry(); | 80 NavigationEntry* entry = GetLastCommittedEntry(); |
80 | 81 |
81 ASSERT_TRUE(entry != NULL); | 82 ASSERT_TRUE(entry != NULL); |
82 EXPECT_EQ(url, entry->GetURL()); | 83 EXPECT_EQ(url, entry->GetURL()); |
83 EXPECT_EQ(url, entry->GetVirtualURL()); | 84 EXPECT_EQ(url, entry->GetVirtualURL()); |
84 } | 85 } |
85 | 86 |
86 } // namespace content | 87 } // namespace content |
OLD | NEW |