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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 StartSyncFlareMock() {} | 36 StartSyncFlareMock() {} |
37 ~StartSyncFlareMock() {} | 37 ~StartSyncFlareMock() {} |
38 | 38 |
39 MOCK_METHOD1(StartSyncFlare, void(syncer::ModelType)); | 39 MOCK_METHOD1(StartSyncFlare, void(syncer::ModelType)); |
40 }; | 40 }; |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 class PasswordStoreTest : public testing::Test { | 44 class PasswordStoreTest : public testing::Test { |
45 protected: | 45 protected: |
46 virtual void SetUp() OVERRIDE { | 46 virtual void SetUp() override { |
47 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 47 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
48 login_db_.reset(new LoginDatabase()); | 48 login_db_.reset(new LoginDatabase()); |
49 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( | 49 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( |
50 FILE_PATH_LITERAL("login_test")))); | 50 FILE_PATH_LITERAL("login_test")))); |
51 } | 51 } |
52 | 52 |
53 virtual void TearDown() OVERRIDE { | 53 virtual void TearDown() override { |
54 ASSERT_TRUE(temp_dir_.Delete()); | 54 ASSERT_TRUE(temp_dir_.Delete()); |
55 } | 55 } |
56 | 56 |
57 base::MessageLoopForUI message_loop_; | 57 base::MessageLoopForUI message_loop_; |
58 scoped_ptr<LoginDatabase> login_db_; | 58 scoped_ptr<LoginDatabase> login_db_; |
59 base::ScopedTempDir temp_dir_; | 59 base::ScopedTempDir temp_dir_; |
60 }; | 60 }; |
61 | 61 |
62 ACTION(STLDeleteElements0) { | 62 ACTION(STLDeleteElements0) { |
63 STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 63 STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 PasswordForm form; | 206 PasswordForm form; |
207 EXPECT_CALL(mock, StartSyncFlare(syncer::PASSWORDS)); | 207 EXPECT_CALL(mock, StartSyncFlare(syncer::PASSWORDS)); |
208 store->AddLogin(form); | 208 store->AddLogin(form); |
209 base::MessageLoop::current()->RunUntilIdle(); | 209 base::MessageLoop::current()->RunUntilIdle(); |
210 } | 210 } |
211 store->Shutdown(); | 211 store->Shutdown(); |
212 base::MessageLoop::current()->RunUntilIdle(); | 212 base::MessageLoop::current()->RunUntilIdle(); |
213 } | 213 } |
214 | 214 |
215 } // namespace password_manager | 215 } // namespace password_manager |
OLD | NEW |