Commit 53010efd authored by Julie Jeongeun Kim's avatar Julie Jeongeun Kim Committed by Commit Bot

[s13n] Port bookmark_bubble_view_browsertest.cc to use IdentityManager

This CL removes SigninManager from bookmark_bubble_view_browsertest.cc
and uses IdentityManager instead of it.

Bug: 927249
Change-Id: Ifea98f39461d900747ce24fec56315489f0608cb
Reviewed-on: https://chromium-review.googlesource.com/c/1449440Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#628498}
parent ec128e3b
......@@ -8,8 +8,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/fake_signin_manager_builder.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
......@@ -17,6 +16,7 @@
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
#include "services/identity/public/cpp/identity_test_utils.h"
#include "ui/views/window/dialog_client_view.h"
class BookmarkBubbleViewBrowserTest : public DialogBrowserTest {
......@@ -26,15 +26,14 @@ class BookmarkBubbleViewBrowserTest : public DialogBrowserTest {
// DialogBrowserTest:
void ShowUi(const std::string& name) override {
#if !defined(OS_CHROMEOS)
identity::IdentityManager* identity_manager =
IdentityManagerFactory::GetForProfile(browser()->profile());
if (name == "bookmark_details") {
SigninManagerFactory::GetForProfile(browser()->profile())
->SignOut(signin_metrics::SIGNOUT_TEST,
signin_metrics::SignoutDelete::IGNORE_METRIC);
identity::ClearPrimaryAccount(
identity_manager, identity::ClearPrimaryAccountPolicy::DEFAULT);
} else {
constexpr char kTestGaiaID[] = "test";
constexpr char kTestUserEmail[] = "testuser@gtest.com";
SigninManagerFactory::GetForProfile(browser()->profile())
->SetAuthenticatedAccountInfo(kTestGaiaID, kTestUserEmail);
identity::MakePrimaryAccountAvailable(identity_manager, kTestUserEmail);
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment