| OLD | NEW | 
|     1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |     1 // Copyright (c) 2009 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 "testing/gmock/include/gmock/gmock.h" |     5 #include "testing/gmock/include/gmock/gmock.h" | 
|     6 #include "testing/gtest/include/gtest/gtest.h" |     6 #include "testing/gtest/include/gtest/gtest.h" | 
|     7  |     7  | 
|     8 #include "base/basictypes.h" |     8 #include "base/basictypes.h" | 
|     9 #include "base/file_util.h" |     9 #include "base/file_util.h" | 
|    10 #include "base/path_service.h" |    10 #include "base/path_service.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|    21 using webkit_glue::PasswordForm; |    21 using webkit_glue::PasswordForm; | 
|    22 using testing::_; |    22 using testing::_; | 
|    23 using testing::DoAll; |    23 using testing::DoAll; | 
|    24 using testing::WithArg; |    24 using testing::WithArg; | 
|    25  |    25  | 
|    26 namespace { |    26 namespace { | 
|    27  |    27  | 
|    28 class MockPasswordStoreConsumer : public PasswordStoreConsumer { |    28 class MockPasswordStoreConsumer : public PasswordStoreConsumer { | 
|    29 public: |    29 public: | 
|    30   MOCK_METHOD2(OnPasswordStoreRequestDone, |    30   MOCK_METHOD2(OnPasswordStoreRequestDone, | 
|    31                void(int, const std::vector<webkit_glue::PasswordForm*>&)); |    31                void(PasswordStore::Handle, | 
 |    32                     const std::vector<webkit_glue::PasswordForm*>&)); | 
|    32 }; |    33 }; | 
|    33  |    34  | 
|    34 ACTION(STLDeleteElements0) { |    35 ACTION(STLDeleteElements0) { | 
|    35   STLDeleteContainerPointers(arg0.begin(), arg0.end()); |    36   STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 
|    36 } |    37 } | 
|    37  |    38  | 
|    38 ACTION(QuitUIMessageLoop) { |    39 ACTION(QuitUIMessageLoop) { | 
|    39   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |    40   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 
|    40   MessageLoop::current()->Quit(); |    41   MessageLoop::current()->Quit(); | 
|    41 } |    42 } | 
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1015       EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; |  1016       EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; | 
|  1016     } |  1017     } | 
|  1017     STLDeleteElements(&matching_items); |  1018     STLDeleteElements(&matching_items); | 
|  1018  |  1019  | 
|  1019     login_db_->GetLogins(*query_form, &matching_items); |  1020     login_db_->GetLogins(*query_form, &matching_items); | 
|  1020     EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) |  1021     EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) | 
|  1021         << "iteration " << i; |  1022         << "iteration " << i; | 
|  1022     STLDeleteElements(&matching_items); |  1023     STLDeleteElements(&matching_items); | 
|  1023   } |  1024   } | 
|  1024 } |  1025 } | 
| OLD | NEW |