| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 <stdarg.h> | 5 #include <stdarg.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 other_auth_.origin = GURL("http://www.example.com/"); | 323 other_auth_.origin = GURL("http://www.example.com/"); |
| 324 other_auth_.username_value = UTF8ToUTF16("username"); | 324 other_auth_.username_value = UTF8ToUTF16("username"); |
| 325 other_auth_.password_value = UTF8ToUTF16("pass"); | 325 other_auth_.password_value = UTF8ToUTF16("pass"); |
| 326 other_auth_.signon_realm = "http://www.example.com/Realm"; | 326 other_auth_.signon_realm = "http://www.example.com/Realm"; |
| 327 other_auth_.date_created = base::Time::Now(); | 327 other_auth_.date_created = base::Time::Now(); |
| 328 other_auth_.date_synced = base::Time::Now(); | 328 other_auth_.date_synced = base::Time::Now(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void TearDown() override { | 331 void TearDown() override { |
| 332 base::ThreadTaskRunnerHandle::Get()->PostTask( | 332 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 333 FROM_HERE, base::MessageLoop::QuitClosure()); | 333 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 334 base::MessageLoop::current()->Run(); | 334 base::MessageLoop::current()->Run(); |
| 335 ASSERT_TRUE(global_mock_libsecret_items); | 335 ASSERT_TRUE(global_mock_libsecret_items); |
| 336 global_mock_libsecret_items = nullptr; | 336 global_mock_libsecret_items = nullptr; |
| 337 } | 337 } |
| 338 | 338 |
| 339 void RunUIThread() { base::MessageLoop::current()->Run(); } | 339 void RunUIThread() { base::MessageLoop::current()->Run(); } |
| 340 | 340 |
| 341 void CheckUint32Attribute(const MockSecretItem* item, | 341 void CheckUint32Attribute(const MockSecretItem* item, |
| 342 const std::string& attribute, | 342 const std::string& attribute, |
| 343 uint32_t value) { | 343 uint32_t value) { |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 EXPECT_EQ(form_google_, *form_list[0]); | 905 EXPECT_EQ(form_google_, *form_list[0]); |
| 906 | 906 |
| 907 EXPECT_EQ(1u, global_mock_libsecret_items->size()); | 907 EXPECT_EQ(1u, global_mock_libsecret_items->size()); |
| 908 if (!global_mock_libsecret_items->empty()) { | 908 if (!global_mock_libsecret_items->empty()) { |
| 909 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, | 909 CheckMockSecretItem((*global_mock_libsecret_items)[0], form_google_, |
| 910 "chrome-42"); | 910 "chrome-42"); |
| 911 } | 911 } |
| 912 } | 912 } |
| 913 | 913 |
| 914 // TODO(mdm): add more basic tests here at some point. | 914 // TODO(mdm): add more basic tests here at some point. |
| OLD | NEW |