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 "base/strings/string16.h" | 5 #include "base/strings/string16.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "components/autofill/content/renderer/password_form_conversion_utils.h" | 7 #include "components/autofill/content/renderer/password_form_conversion_utils.h" |
8 #include "content/public/common/password_form.h" | 8 #include "components/autofill/core/common/password_form.h" |
9 #include "content/public/test/render_view_test.h" | 9 #include "content/public/test/render_view_test.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/WebKit/public/platform/WebVector.h" | 11 #include "third_party/WebKit/public/platform/WebVector.h" |
12 #include "third_party/WebKit/public/web/WebDocument.h" | 12 #include "third_party/WebKit/public/web/WebDocument.h" |
13 #include "third_party/WebKit/public/web/WebFormElement.h" | 13 #include "third_party/WebKit/public/web/WebFormElement.h" |
14 #include "third_party/WebKit/public/web/WebPasswordFormData.h" | 14 #include "third_party/WebKit/public/web/WebPasswordFormData.h" |
15 | 15 |
16 using content::PasswordForm; | |
17 using WebKit::WebFormElement; | 16 using WebKit::WebFormElement; |
18 using WebKit::WebFrame; | 17 using WebKit::WebFrame; |
19 using WebKit::WebPasswordFormData; | 18 using WebKit::WebPasswordFormData; |
20 using WebKit::WebVector; | 19 using WebKit::WebVector; |
21 | 20 |
22 namespace autofill { | 21 namespace autofill { |
23 namespace { | 22 namespace { |
24 | 23 |
25 class PasswordFormConversionUtilsTest : public content::RenderViewTest { | 24 class PasswordFormConversionUtilsTest : public content::RenderViewTest { |
26 public: | 25 public: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 frame->document().forms(forms); | 82 frame->document().forms(forms); |
84 ASSERT_EQ(1U, forms.size()); | 83 ASSERT_EQ(1U, forms.size()); |
85 WebPasswordFormData web_password_form(forms[0]); | 84 WebPasswordFormData web_password_form(forms[0]); |
86 ASSERT_FALSE(web_password_form.isValid()); | 85 ASSERT_FALSE(web_password_form.isValid()); |
87 | 86 |
88 scoped_ptr<PasswordForm> password_form = CreatePasswordForm(forms[0]); | 87 scoped_ptr<PasswordForm> password_form = CreatePasswordForm(forms[0]); |
89 EXPECT_EQ(static_cast<PasswordForm*>(NULL), password_form.get()); | 88 EXPECT_EQ(static_cast<PasswordForm*>(NULL), password_form.get()); |
90 } | 89 } |
91 | 90 |
92 } // namespace autofill | 91 } // namespace autofill |
OLD | NEW |