Index: chrome/browser/password_manager/password_store_win_unittest.cc |
=================================================================== |
--- chrome/browser/password_manager/password_store_win_unittest.cc (revision 136877) |
+++ chrome/browser/password_manager/password_store_win_unittest.cc (working copy) |
@@ -120,8 +120,12 @@ |
virtual void TearDown() { |
if (store_.get()) |
store_->ShutdownOnUIThread(); |
- if (wds_.get()) |
- wds_->Shutdown(); |
+ wds_->ShutdownOnUIThread(); |
+ wds_ = NULL; |
+ base::WaitableEvent done(false, false); |
+ BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done))); |
+ done.Wait(); |
MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
MessageLoop::current()->Run(); |
db_thread_.Stop(); |
@@ -250,7 +254,6 @@ |
// Release the PSW and the WDS before the query can return. |
store_->ShutdownOnUIThread(); |
store_ = NULL; |
- wds_->Shutdown(); |
wds_ = NULL; |
MessageLoop::current()->RunAllPending(); |