| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |