| 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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 scoped_ptr<PromptObserver> prompt_observer( | 1118 scoped_ptr<PromptObserver> prompt_observer( |
| 1119 PromptObserver::Create(WebContents())); | 1119 PromptObserver::Create(WebContents())); |
| 1120 // Make sure that the only passwords saved are the auto-saved ones. | 1120 // Make sure that the only passwords saved are the auto-saved ones. |
| 1121 std::string fill_and_submit = | 1121 std::string fill_and_submit = |
| 1122 "document.getElementById('username_field').value = 'temp';" | 1122 "document.getElementById('username_field').value = 'temp';" |
| 1123 "document.getElementById('password_field').value = 'random';" | 1123 "document.getElementById('password_field').value = 'random';" |
| 1124 "document.getElementById('input_submit_button').click()"; | 1124 "document.getElementById('input_submit_button').click()"; |
| 1125 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit)); | 1125 ASSERT_TRUE(content::ExecuteScript(RenderViewHost(), fill_and_submit)); |
| 1126 observer.Wait(); | 1126 observer.Wait(); |
| 1127 if (chrome::VersionInfo::GetChannel() == | 1127 if (chrome::VersionInfo::GetChannel() == |
| 1128 chrome::VersionInfo::CHANNEL_UNKNOWN) { | 1128 version_info::Channel::UNKNOWN) { |
| 1129 // Passwords getting auto-saved, no prompt. | 1129 // Passwords getting auto-saved, no prompt. |
| 1130 EXPECT_FALSE(prompt_observer->IsShowingPrompt()); | 1130 EXPECT_FALSE(prompt_observer->IsShowingPrompt()); |
| 1131 EXPECT_FALSE(password_store->IsEmpty()); | 1131 EXPECT_FALSE(password_store->IsEmpty()); |
| 1132 } else { | 1132 } else { |
| 1133 // Prompt shown, and no passwords saved automatically. | 1133 // Prompt shown, and no passwords saved automatically. |
| 1134 EXPECT_TRUE(prompt_observer->IsShowingPrompt()); | 1134 EXPECT_TRUE(prompt_observer->IsShowingPrompt()); |
| 1135 EXPECT_TRUE(password_store->IsEmpty()); | 1135 EXPECT_TRUE(password_store->IsEmpty()); |
| 1136 } | 1136 } |
| 1137 } | 1137 } |
| 1138 | 1138 |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); | 2015 content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); |
| 2016 | 2016 |
| 2017 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 2017 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
| 2018 iframe->GetProcess()->GetChannel(), illegal_forms_parsed); | 2018 iframe->GetProcess()->GetChannel(), illegal_forms_parsed); |
| 2019 | 2019 |
| 2020 iframe_killed.Wait(); | 2020 iframe_killed.Wait(); |
| 2021 } | 2021 } |
| 2022 | 2022 |
| 2023 } // namespace password_manager | 2023 } // namespace password_manager |
| 2024 | 2024 |
| OLD | NEW |