| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/common/autofill_messages.h" | 7 #include "chrome/common/autofill_messages.h" |
| 8 #include "chrome/common/form_data.h" |
| 9 #include "chrome/common/form_field.h" |
| 8 #include "chrome/renderer/autofill/autofill_agent.h" | 10 #include "chrome/renderer/autofill/autofill_agent.h" |
| 9 #include "chrome/renderer/autofill/password_autofill_manager.h" | 11 #include "chrome/renderer/autofill/password_autofill_manager.h" |
| 10 #include "chrome/test/base/chrome_render_view_test.h" | 12 #include "chrome/test/base/chrome_render_view_test.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" |
| 19 #include "ui/base/keycodes/keyboard_codes.h" | 21 #include "ui/base/keycodes/keyboard_codes.h" |
| 20 #include "webkit/forms/form_data.h" | |
| 21 #include "webkit/forms/form_field.h" | |
| 22 | 22 |
| 23 using webkit::forms::FormField; | 23 using chrome::PasswordFormFillData; |
| 24 using webkit::forms::PasswordFormFillData; | 24 using chrome::FormField; |
| 25 using webkit::forms::PasswordForm; | 25 using content::PasswordForm; |
| 26 using webkit::forms::PasswordFormDomManager; | |
| 27 using WebKit::WebDocument; | 26 using WebKit::WebDocument; |
| 28 using WebKit::WebElement; | 27 using WebKit::WebElement; |
| 29 using WebKit::WebFrame; | 28 using WebKit::WebFrame; |
| 30 using WebKit::WebInputElement; | 29 using WebKit::WebInputElement; |
| 31 using WebKit::WebString; | 30 using WebKit::WebString; |
| 32 | 31 |
| 33 namespace { | 32 namespace { |
| 34 | 33 |
| 35 // The name of the username/password element in the form. | 34 // The name of the username/password element in the form. |
| 36 const char* const kUsernameName = "username"; | 35 const char* const kUsernameName = "username"; |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 // didSelectAutofillSuggestion on the renderer. | 412 // didSelectAutofillSuggestion on the renderer. |
| 414 autofill_agent_->didSelectAutofillSuggestion(username_element_, | 413 autofill_agent_->didSelectAutofillSuggestion(username_element_, |
| 415 ASCIIToUTF16(kAliceUsername), | 414 ASCIIToUTF16(kAliceUsername), |
| 416 WebKit::WebString(), | 415 WebKit::WebString(), |
| 417 0); | 416 0); |
| 418 // Autocomplete should not have kicked in. | 417 // Autocomplete should not have kicked in. |
| 419 CheckTextFieldsState("", false, "", false); | 418 CheckTextFieldsState("", false, "", false); |
| 420 } | 419 } |
| 421 | 420 |
| 422 } // namespace autofill | 421 } // namespace autofill |
| OLD | NEW |