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

Unified Diff: chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc

Issue 2010463002: Mocker for OSCrypt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated doc Created 4 years, 7 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 | « chrome/browser/signin/local_auth_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
diff --git a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
index 66c0760b54aa299750c316e5c6816cbb4da6a4da..4500c966af00b8642515d6d64f5f11470100e035 100644
--- a/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
+++ b/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
@@ -4,9 +4,14 @@
#include "chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h"
+#include <map>
+#include <string>
+#include <vector>
+
#include "base/command_line.h"
#include "base/run_loop.h"
#include "build/build_config.h"
+#include "components/os_crypt/os_crypt_mocker.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/prefs/testing_pref_service.h"
@@ -25,10 +30,6 @@
#include "net/url_request/test_url_fetcher_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_MACOSX)
-#include "components/os_crypt/os_crypt.h"
-#endif
-
// Defining constant here to handle backward compatiblity tests, but this
// constant is no longer used in current versions of chrome.
static const char kLSOService[] = "lso";
@@ -51,9 +52,7 @@ class MutableProfileOAuth2TokenServiceDelegateTest
end_batch_changes_(0) {}
void SetUp() override {
-#if defined(OS_MACOSX)
- OSCrypt::UseMockKeychain(true);
-#endif
+ OSCryptMocker::SetUpWithSingleton();
factory_.SetFakeResponse(GaiaUrls::GetInstance()->oauth2_revoke_url(), "",
net::HTTP_OK, net::URLRequestStatus::SUCCESS);
@@ -78,6 +77,7 @@ class MutableProfileOAuth2TokenServiceDelegateTest
void TearDown() override {
oauth2_service_delegate_->RemoveObserver(this);
oauth2_service_delegate_->Shutdown();
+ OSCryptMocker::TearDown();
}
void AddAuthTokenManually(const std::string& service,
« no previous file with comments | « chrome/browser/signin/local_auth_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698