| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "components/autofill/browser/webdata/autofill_webdata_service.h" | 13 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 14 #include "components/autofill/core/common/form_field_data.h" | 14 #include "components/autofill/core/common/form_field_data.h" |
| 15 #include "content/public/test/test_browser_thread.h" | 15 #include "content/public/test/test_browser_thread.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "ui/base/l10n/l10n_util_android.h" | 17 #include "ui/base/l10n/l10n_util_android.h" |
| 18 | 18 |
| 19 using autofill::AutofillWebDataService; | 19 using autofill::AutofillWebDataService; |
| 20 using autofill::FormFieldData; | 20 using autofill::FormFieldData; |
| 21 using base::android::AttachCurrentThread; | 21 using base::android::AttachCurrentThread; |
| 22 using content::BrowserThread; | 22 using content::BrowserThread; |
| 23 using testing::Test; | 23 using testing::Test; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 field.name = ASCIIToUTF16("foo"); | 64 field.name = ASCIIToUTF16("foo"); |
| 65 field.value = ASCIIToUTF16("bar"); | 65 field.value = ASCIIToUTF16("bar"); |
| 66 fields.push_back(field); | 66 fields.push_back(field); |
| 67 service_->get_autofill_webdata_service()->AddFormFields(fields); | 67 service_->get_autofill_webdata_service()->AddFormFields(fields); |
| 68 EXPECT_TRUE(service_->HasFormData()); | 68 EXPECT_TRUE(service_->HasFormData()); |
| 69 service_->ClearFormData(); | 69 service_->ClearFormData(); |
| 70 EXPECT_FALSE(service_->HasFormData()); | 70 EXPECT_FALSE(service_->HasFormData()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace android_webview | 73 } // namespace android_webview |
| OLD | NEW |