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

Side by Side Diff: chrome/browser/password_manager/password_manager_browsertest.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 4 months 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
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_samples.h" 8 #include "base/metrics/histogram_samples.h"
9 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 CheckElementValue("iframe", "username_field", "temp"); 1963 CheckElementValue("iframe", "username_field", "temp");
1964 1964
1965 } 1965 }
1966 1966
1967 // The password manager driver will kill processes when they try to access 1967 // The password manager driver will kill processes when they try to access
1968 // passwords of sites other than the site the process is dedicated to, under 1968 // passwords of sites other than the site the process is dedicated to, under
1969 // site isolation. 1969 // site isolation.
1970 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase, 1970 IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTestBase,
1971 CrossSitePasswordEnforcement) { 1971 CrossSitePasswordEnforcement) {
1972 // The code under test is only active under site isolation. 1972 // The code under test is only active under site isolation.
1973 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 1973 if (!content::AreAllSitesIsolatedForTesting()) {
1974 ::switches::kSitePerProcess)) {
1975 return; 1974 return;
1976 } 1975 }
1977 1976
1978 // Setup the mock host resolver 1977 // Setup the mock host resolver
1979 host_resolver()->AddRule("*", "127.0.0.1"); 1978 host_resolver()->AddRule("*", "127.0.0.1");
1980 1979
1981 // Navigate the main frame. 1980 // Navigate the main frame.
1982 GURL main_frame_url = embedded_test_server()->GetURL( 1981 GURL main_frame_url = embedded_test_server()->GetURL(
1983 "/password/password_form_in_crosssite_iframe.html"); 1982 "/password/password_form_in_crosssite_iframe.html");
1984 NavigationObserver observer(WebContents()); 1983 NavigationObserver observer(WebContents());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 2015 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
2017 2016
2018 IPC::IpcSecurityTestUtil::PwnMessageReceived( 2017 IPC::IpcSecurityTestUtil::PwnMessageReceived(
2019 iframe->GetProcess()->GetChannel(), illegal_forms_parsed); 2018 iframe->GetProcess()->GetChannel(), illegal_forms_parsed);
2020 2019
2021 iframe_killed.Wait(); 2020 iframe_killed.Wait();
2022 } 2021 }
2023 2022
2024 } // namespace password_manager 2023 } // namespace password_manager
2025 2024
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/task_manager/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698