OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/macros.h" | 5 #include "base/macros.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/test/base/chrome_render_view_test.h" | 7 #include "chrome/test/base/chrome_render_view_test.h" |
8 #include "components/autofill/content/renderer/form_classifier.h" | 8 #include "components/autofill/content/renderer/form_classifier.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/web/WebDocument.h" | 10 #include "third_party/WebKit/public/web/WebDocument.h" |
11 #include "third_party/WebKit/public/web/WebFormElement.h" | 11 #include "third_party/WebKit/public/web/WebFormElement.h" |
12 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 12 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
13 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 13 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
14 #include "ui/native_theme/native_theme_switches.h" | 14 #include "ui/native_theme/native_theme_features.h" |
15 | 15 |
16 namespace autofill { | 16 namespace autofill { |
17 | 17 |
18 class FormClassifierTest : public ChromeRenderViewTest { | 18 class FormClassifierTest : public ChromeRenderViewTest { |
19 public: | 19 public: |
20 FormClassifierTest() {} | 20 FormClassifierTest() {} |
21 | 21 |
22 void SetUp() override { | 22 void SetUp() override { |
23 blink::WebRuntimeFeatures::EnableOverlayScrollbars( | 23 blink::WebRuntimeFeatures::EnableOverlayScrollbars( |
24 ui::IsOverlayScrollbarEnabled()); | 24 ui::IsOverlayScrollbarEnabled()); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 | 236 |
237 TEST_F(FormClassifierTest, kChangeFormWithTreePasswordFieldsHTML) { | 237 TEST_F(FormClassifierTest, kChangeFormWithTreePasswordFieldsHTML) { |
238 LoadHTML(kChangeFormWithTreePasswordFieldsHTML); | 238 LoadHTML(kChangeFormWithTreePasswordFieldsHTML); |
239 std::string generation_field; | 239 std::string generation_field; |
240 EXPECT_TRUE(GetGenerationField(&generation_field)); | 240 EXPECT_TRUE(GetGenerationField(&generation_field)); |
241 EXPECT_EQ("password", generation_field); | 241 EXPECT_EQ("password", generation_field); |
242 } | 242 } |
243 | 243 |
244 } // namespace autofill | 244 } // namespace autofill |
OLD | NEW |