Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: chrome/browser/chrome_content_browser_client_browsertest.cc

Issue 11416121: Prevent cross-site pages when --site-per-process is passed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698