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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/synchronization/waitable_event.h" | 18 #include "base/synchronization/waitable_event.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 #include "chrome/browser/webdata/web_data_service.h" | 20 #include "chrome/browser/webdata/web_data_service.h" |
21 #include "components/autofill/browser/autofill_country.h" | 21 #include "components/autofill/browser/autofill_country.h" |
22 #include "components/autofill/browser/autofill_profile.h" | 22 #include "components/autofill/browser/autofill_profile.h" |
23 #include "components/autofill/browser/credit_card.h" | 23 #include "components/autofill/browser/credit_card.h" |
24 #include "components/autofill/browser/webdata/autofill_change.h" | 24 #include "components/autofill/browser/webdata/autofill_change.h" |
25 #include "components/autofill/browser/webdata/autofill_entry.h" | 25 #include "components/autofill/browser/webdata/autofill_entry.h" |
26 #include "components/autofill/browser/webdata/autofill_table.h" | 26 #include "components/autofill/browser/webdata/autofill_table.h" |
27 #include "components/autofill/browser/webdata/autofill_webdata_service.h" | 27 #include "components/autofill/browser/webdata/autofill_webdata_service.h" |
28 #include "components/autofill/browser/webdata/autofill_webdata_service_observer.
h" | 28 #include "components/autofill/browser/webdata/autofill_webdata_service_observer.
h" |
29 #include "components/autofill/common/form_field_data.h" | 29 #include "components/autofill/core/common/form_field_data.h" |
30 #include "components/webdata/common/web_database_service.h" | |
31 #include "components/webdata/common/web_data_results.h" | 30 #include "components/webdata/common/web_data_results.h" |
32 #include "components/webdata/common/web_data_service_base.h" | 31 #include "components/webdata/common/web_data_service_base.h" |
33 #include "components/webdata/common/web_data_service_consumer.h" | 32 #include "components/webdata/common/web_data_service_consumer.h" |
| 33 #include "components/webdata/common/web_database_service.h" |
34 #include "content/public/test/test_browser_thread.h" | 34 #include "content/public/test/test_browser_thread.h" |
35 #include "testing/gmock/include/gmock/gmock.h" | 35 #include "testing/gmock/include/gmock/gmock.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 36 #include "testing/gtest/include/gtest/gtest.h" |
37 | 37 |
38 using base::Time; | 38 using base::Time; |
39 using base::TimeDelta; | 39 using base::TimeDelta; |
40 using base::WaitableEvent; | 40 using base::WaitableEvent; |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 using testing::_; | 42 using testing::_; |
43 using testing::DoDefault; | 43 using testing::DoDefault; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 565 |
566 // Check that the credit card was removed. | 566 // Check that the credit card was removed. |
567 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; | 567 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; |
568 handle2 = wds_->GetCreditCards(&card_consumer2); | 568 handle2 = wds_->GetCreditCards(&card_consumer2); |
569 base::MessageLoop::current()->Run(); | 569 base::MessageLoop::current()->Run(); |
570 EXPECT_EQ(handle2, card_consumer2.handle()); | 570 EXPECT_EQ(handle2, card_consumer2.handle()); |
571 ASSERT_EQ(0U, card_consumer2.result().size()); | 571 ASSERT_EQ(0U, card_consumer2.result().size()); |
572 } | 572 } |
573 | 573 |
574 } // namespace autofill | 574 } // namespace autofill |
OLD | NEW |