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

Unified Diff: chrome/browser/chromeos/cros/cros_library.cc

Issue 1251001: Fixed loader issue in unit tests caused by some test not using that mock and ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/google_authenticator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/cros_library.cc
===================================================================
--- chrome/browser/chromeos/cros/cros_library.cc (revision 42415)
+++ chrome/browser/chromeos/cros/cros_library.cc (working copy)
@@ -114,9 +114,15 @@
}
void CrosLibrary::TestApi::SetLibraryLoader(LibraryLoader* loader) {
+ if (library_->library_loader_ == loader)
+ return;
if (library_->library_loader_)
delete library_->library_loader_;
library_->library_loader_ = loader;
+ // Reset load flags when loader changes. Otherwise some tests are really not
+ // going to be happy.
+ library_->loaded_ = false;
+ library_->load_error_ = false;
}
void CrosLibrary::TestApi::SetCryptohomeLibrary(CryptohomeLibrary* library) {
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/google_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698