| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 // Let the DB thread run to completion of all current tasks. | 300 // Let the DB thread run to completion of all current tasks. |
| 301 void RunDBThread() { | 301 void RunDBThread() { |
| 302 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, | 302 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 303 base::WaitableEvent::InitialState::NOT_SIGNALED); | 303 base::WaitableEvent::InitialState::NOT_SIGNALED); |
| 304 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, | 304 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
| 305 base::Bind(ThreadDone, &event)); | 305 base::Bind(ThreadDone, &event)); |
| 306 event.Wait(); | 306 event.Wait(); |
| 307 // Some of the tests may post messages to the UI thread, but we don't need | 307 // Some of the tests may post messages to the UI thread, but we don't need |
| 308 // to run those until after the DB thread is finished. So run it here. | 308 // to run those until after the DB thread is finished. So run it here. |
| 309 message_loop_.RunUntilIdle(); | 309 base::RunLoop().RunUntilIdle(); |
| 310 } | 310 } |
| 311 static void ThreadDone(base::WaitableEvent* event) { | 311 static void ThreadDone(base::WaitableEvent* event) { |
| 312 event->Signal(); | 312 event->Signal(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 // Utilities to help verify sets of expectations. | 315 // Utilities to help verify sets of expectations. |
| 316 typedef std::vector< | 316 typedef std::vector< |
| 317 std::pair<std::string, | 317 std::pair<std::string, |
| 318 std::vector<const PasswordForm*> > > ExpectationArray; | 318 std::vector<const PasswordForm*> > > ExpectationArray; |
| 319 void CheckPasswordForms(const std::string& folder, | 319 void CheckPasswordForms(const std::string& folder, |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 CheckVersion7Pickle(); | 1431 CheckVersion7Pickle(); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) { | 1434 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) { |
| 1435 CheckVersion8Pickle(); | 1435 CheckVersion8Pickle(); |
| 1436 } | 1436 } |
| 1437 | 1437 |
| 1438 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) { | 1438 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) { |
| 1439 CheckVersion9Pickle(); | 1439 CheckVersion9Pickle(); |
| 1440 } | 1440 } |
| OLD | NEW |