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/string16.h" | 15 #include "base/string16.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
18 #include "base/time.h" | 18 #include "base/time.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "chrome/browser/webdata/autofill_change.h" | |
21 #include "chrome/browser/webdata/autofill_entry.h" | |
22 #include "chrome/browser/webdata/autofill_table.h" | |
23 #include "chrome/browser/webdata/autofill_web_data_service.h" | |
24 #include "chrome/browser/webdata/autofill_web_data_service_observer.h" | |
25 #include "chrome/browser/webdata/web_data_service_test_util.h" | 20 #include "chrome/browser/webdata/web_data_service_test_util.h" |
26 #include "chrome/browser/webdata/web_database_service.h" | |
27 #include "components/autofill/browser/autofill_country.h" | 21 #include "components/autofill/browser/autofill_country.h" |
28 #include "components/autofill/browser/autofill_profile.h" | 22 #include "components/autofill/browser/autofill_profile.h" |
29 #include "components/autofill/browser/credit_card.h" | 23 #include "components/autofill/browser/credit_card.h" |
30 #include "components/autofill/common/form_field_data.h" | 24 #include "components/autofill/common/form_field_data.h" |
| 25 #include "components/webdata/autofill/autofill_change.h" |
| 26 #include "components/webdata/autofill/autofill_entry.h" |
| 27 #include "components/webdata/autofill/autofill_table.h" |
| 28 #include "components/webdata/autofill/autofill_webdata_service.h" |
| 29 #include "components/webdata/autofill/autofill_webdata_service_observer.h" |
| 30 #include "components/webdata/common/web_database_service.h" |
31 #include "content/public/test/test_browser_thread.h" | 31 #include "content/public/test/test_browser_thread.h" |
32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
35 using base::Time; | 35 using base::Time; |
36 using base::TimeDelta; | 36 using base::TimeDelta; |
37 using base::WaitableEvent; | 37 using base::WaitableEvent; |
38 using content::BrowserThread; | 38 using content::BrowserThread; |
39 using testing::_; | 39 using testing::_; |
40 using testing::DoDefault; | 40 using testing::DoDefault; |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 EXPECT_EQ(handle2, profile_consumer2.handle()); | 523 EXPECT_EQ(handle2, profile_consumer2.handle()); |
524 ASSERT_EQ(0U, profile_consumer2.result().size()); | 524 ASSERT_EQ(0U, profile_consumer2.result().size()); |
525 | 525 |
526 // Check that the credit card was removed. | 526 // Check that the credit card was removed. |
527 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; | 527 AutofillWebDataServiceConsumer<std::vector<CreditCard*> > card_consumer2; |
528 handle2 = wds_->GetCreditCards(&card_consumer2); | 528 handle2 = wds_->GetCreditCards(&card_consumer2); |
529 MessageLoop::current()->Run(); | 529 MessageLoop::current()->Run(); |
530 EXPECT_EQ(handle2, card_consumer2.handle()); | 530 EXPECT_EQ(handle2, card_consumer2.handle()); |
531 ASSERT_EQ(0U, card_consumer2.result().size()); | 531 ASSERT_EQ(0U, card_consumer2.result().size()); |
532 } | 532 } |
OLD | NEW |