| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // The PasswordManagerAutocompleteTests in this file test only the | 5 // The PasswordManagerAutocompleteTests in this file test only the |
| 6 // PasswordAutocompleteListener class implementation (and not any of the | 6 // PasswordAutocompleteListener class implementation (and not any of the |
| 7 // higher level dom autocomplete framework). | 7 // higher level dom autocomplete framework). |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "webkit/glue/form_field.h" | 14 #include "webkit/glue/form_field.h" |
| 14 #include "webkit/glue/webpasswordautocompletelistener_impl.h" | 15 #include "webkit/glue/webpasswordautocompletelistener_impl.h" |
| 15 | 16 |
| 16 using WebKit::WebString; | 17 using WebKit::WebString; |
| 17 using webkit_glue::FormField; | 18 using webkit_glue::FormField; |
| 18 using webkit_glue::PasswordFormDomManager; | 19 using webkit_glue::PasswordFormDomManager; |
| 19 using webkit_glue::PasswordFormFillData; | 20 using webkit_glue::PasswordFormFillData; |
| 20 using webkit_glue::WebInputElementDelegate; | 21 using webkit_glue::WebInputElementDelegate; |
| 21 using webkit_glue::WebPasswordAutocompleteListenerImpl; | 22 using webkit_glue::WebPasswordAutocompleteListenerImpl; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // User modifies the login name to an unknown one. | 283 // User modifies the login name to an unknown one. |
| 283 listener->performInlineAutocomplete(ASCIIToUTF16("alicia"), false, false); | 284 listener->performInlineAutocomplete(ASCIIToUTF16("alicia"), false, false); |
| 284 // We should not be autofilled anymore and the password should have been | 285 // We should not be autofilled anymore and the password should have been |
| 285 // cleared. | 286 // cleared. |
| 286 EXPECT_FALSE(username_delegate_->IsAutofilled()); | 287 EXPECT_FALSE(username_delegate_->IsAutofilled()); |
| 287 EXPECT_FALSE(password_delegate_->IsAutofilled()); | 288 EXPECT_FALSE(password_delegate_->IsAutofilled()); |
| 288 EXPECT_TRUE(password_delegate_->value().empty()); | 289 EXPECT_TRUE(password_delegate_->value().empty()); |
| 289 } | 290 } |
| 290 | 291 |
| 291 } // namespace | 292 } // namespace |
| OLD | NEW |