Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 autofill_test::DisableSystemServices(profile_.get()); | 59 autofill_test::DisableSystemServices(profile_.get()); |
| 60 ResetPersonalDataManager(); | 60 ResetPersonalDataManager(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual void TearDown() { | 63 virtual void TearDown() { |
| 64 // Destruction order is imposed explicitly here. | 64 // Destruction order is imposed explicitly here. |
| 65 personal_data_.reset(NULL); | 65 personal_data_.reset(NULL); |
| 66 profile_.reset(NULL); | 66 profile_.reset(NULL); |
| 67 | 67 |
| 68 db_thread_.Stop(); | 68 db_thread_.Stop(); |
| 69 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); | 69 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure); |
|
awong
2011/12/08 20:01:50
QuitClosure()?
| |
| 70 MessageLoop::current()->Run(); | 70 MessageLoop::current()->Run(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void ResetPersonalDataManager() { | 73 void ResetPersonalDataManager() { |
| 74 personal_data_.reset(new PersonalDataManager); | 74 personal_data_.reset(new PersonalDataManager); |
| 75 personal_data_->Init(profile_.get()); | 75 personal_data_->Init(profile_.get()); |
| 76 personal_data_->SetObserver(&personal_data_observer_); | 76 personal_data_->SetObserver(&personal_data_observer_); |
| 77 | 77 |
| 78 // Verify that the web database has been updated and the notification sent. | 78 // Verify that the web database has been updated and the notification sent. |
| 79 EXPECT_CALL(personal_data_observer_, | 79 EXPECT_CALL(personal_data_observer_, |
| (...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1949 | 1949 |
| 1950 // Modify expected to include multi-valued fields. | 1950 // Modify expected to include multi-valued fields. |
| 1951 std::vector<string16> values; | 1951 std::vector<string16> values; |
| 1952 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values); | 1952 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values); |
| 1953 values.push_back(ASCIIToUTF16("214-555-1234")); | 1953 values.push_back(ASCIIToUTF16("214-555-1234")); |
| 1954 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values); | 1954 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values); |
| 1955 | 1955 |
| 1956 ASSERT_EQ(1U, results2.size()); | 1956 ASSERT_EQ(1U, results2.size()); |
| 1957 EXPECT_EQ(0, expected.CompareMulti(*results2[0])); | 1957 EXPECT_EQ(0, expected.CompareMulti(*results2[0])); |
| 1958 } | 1958 } |
| OLD | NEW |