Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/password_manager/password_store_mac_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 ASSERT_TRUE(login_db_->Init(db_file)); 908 ASSERT_TRUE(login_db_->Init(db_file));
909 909
910 keychain_ = new MockKeychain(3); 910 keychain_ = new MockKeychain(3);
911 911
912 store_ = new PasswordStoreMac(keychain_, login_db_); 912 store_ = new PasswordStoreMac(keychain_, login_db_);
913 ASSERT_TRUE(store_->Init()); 913 ASSERT_TRUE(store_->Init());
914 } 914 }
915 915
916 virtual void TearDown() { 916 virtual void TearDown() {
917 store_->Shutdown(); 917 store_->Shutdown();
918 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); 918 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
919 MessageLoop::current()->Run(); 919 MessageLoop::current()->Run();
920 } 920 }
921 921
922 protected: 922 protected:
923 MessageLoopForUI message_loop_; 923 MessageLoopForUI message_loop_;
924 content::TestBrowserThread ui_thread_; 924 content::TestBrowserThread ui_thread_;
925 925
926 MockKeychain* keychain_; // Owned by store_. 926 MockKeychain* keychain_; // Owned by store_.
927 LoginDatabase* login_db_; // Owned by store_. 927 LoginDatabase* login_db_; // Owned by store_.
928 scoped_refptr<PasswordStoreMac> store_; 928 scoped_refptr<PasswordStoreMac> store_;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; 1019 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i;
1020 } 1020 }
1021 STLDeleteElements(&matching_items); 1021 STLDeleteElements(&matching_items);
1022 1022
1023 login_db_->GetLogins(*query_form, &matching_items); 1023 login_db_->GetLogins(*query_form, &matching_items);
1024 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) 1024 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size())
1025 << "iteration " << i; 1025 << "iteration " << i;
1026 STLDeleteElements(&matching_items); 1026 STLDeleteElements(&matching_items);
1027 } 1027 }
1028 } 1028 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698