OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/password_manager/password_form_manager.h" | 9 #include "chrome/browser/password_manager/password_form_manager.h" |
9 #include "chrome/browser/password_manager/password_manager.h" | 10 #include "chrome/browser/password_manager/password_manager.h" |
10 #include "chrome/browser/profile_manager.h" | 11 #include "chrome/browser/profile_manager.h" |
11 #include "chrome/test/testing_profile.h" | 12 #include "chrome/test/testing_profile.h" |
12 #include "webkit/glue/password_form.h" | 13 #include "webkit/glue/password_form.h" |
13 | 14 |
14 using webkit_glue::PasswordForm; | 15 using webkit_glue::PasswordForm; |
15 | 16 |
16 class PasswordFormManagerTest : public testing::Test { | 17 class PasswordFormManagerTest : public testing::Test { |
17 public: | 18 public: |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 credentials.username_element = saved_match()->username_element; | 222 credentials.username_element = saved_match()->username_element; |
222 credentials.password_element.clear(); | 223 credentials.password_element.clear(); |
223 PasswordFormManager manager3(profile(), NULL, credentials, false); | 224 PasswordFormManager manager3(profile(), NULL, credentials, false); |
224 SimulateMatchingPhase(&manager3, false); | 225 SimulateMatchingPhase(&manager3, false); |
225 manager3.ProvisionallySave(credentials); | 226 manager3.ProvisionallySave(credentials); |
226 | 227 |
227 // Invalid form - no password. | 228 // Invalid form - no password. |
228 EXPECT_FALSE(manager3.HasValidPasswordForm()); | 229 EXPECT_FALSE(manager3.HasValidPasswordForm()); |
229 } | 230 } |
230 | 231 |
OLD | NEW |