OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 using testing::_; | 45 using testing::_; |
46 using testing::DoAll; | 46 using testing::DoAll; |
47 using testing::DoDefault; | 47 using testing::DoDefault; |
48 using testing::ElementsAre; | 48 using testing::ElementsAre; |
49 using testing::Eq; | 49 using testing::Eq; |
50 using testing::Invoke; | 50 using testing::Invoke; |
51 using testing::Return; | 51 using testing::Return; |
52 using testing::SaveArg; | 52 using testing::SaveArg; |
53 using testing::SetArgumentPointee; | 53 using testing::SetArgumentPointee; |
54 | 54 |
| 55 #if 0 |
| 56 |
55 class WebDatabaseMock : public WebDatabase { | 57 class WebDatabaseMock : public WebDatabase { |
56 public: | 58 public: |
57 MOCK_METHOD2(RemoveFormElement, | 59 MOCK_METHOD2(RemoveFormElement, |
58 bool(const string16& name, const string16& value)); // NOLINT | 60 bool(const string16& name, const string16& value)); // NOLINT |
59 MOCK_METHOD1(GetAllAutofillEntries, | 61 MOCK_METHOD1(GetAllAutofillEntries, |
60 bool(std::vector<AutofillEntry>* entries)); // NOLINT | 62 bool(std::vector<AutofillEntry>* entries)); // NOLINT |
61 MOCK_METHOD3(GetAutofillTimestamps, | 63 MOCK_METHOD3(GetAutofillTimestamps, |
62 bool(const string16& name, // NOLINT | 64 bool(const string16& name, // NOLINT |
63 const string16& value, | 65 const string16& value, |
64 std::vector<base::Time>* timestamps)); | 66 std::vector<base::Time>* timestamps)); |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 service_->AddObserver(&observer); | 980 service_->AddObserver(&observer); |
979 EXPECT_CALL(observer, OnStateChanged()).WillOnce(QuitUIMessageLoop()); | 981 EXPECT_CALL(observer, OnStateChanged()).WillOnce(QuitUIMessageLoop()); |
980 MessageLoop::current()->Run(); | 982 MessageLoop::current()->Run(); |
981 EXPECT_TRUE(service_->unrecoverable_error_detected()); | 983 EXPECT_TRUE(service_->unrecoverable_error_detected()); |
982 | 984 |
983 // Ensure future autofill notifications don't crash. | 985 // Ensure future autofill notifications don't crash. |
984 notifier->Notify(NotificationType::AUTOFILL_ENTRIES_CHANGED, | 986 notifier->Notify(NotificationType::AUTOFILL_ENTRIES_CHANGED, |
985 Source<WebDataService>(web_data_service_.get()), | 987 Source<WebDataService>(web_data_service_.get()), |
986 Details<AutofillChangeList>(&changes)); | 988 Details<AutofillChangeList>(&changes)); |
987 } | 989 } |
| 990 |
| 991 #endif |
OLD | NEW |