Commit 48246c46 authored by siyua's avatar siyua Committed by Commit Bot

[Autofill] Added browser tests for local card migration flow (part 1)

The previous browser tests CL got reverted twice due to flaky tests,
so I will try to break the browser tests into several CLs. Listed the
following tests to be added in the TODO in the browser tests file.


Bug: 897998
Change-Id: Ib3c99de27028530e2f8bce7b616d7d5a9dae4cd3
Reviewed-on: https://chromium-review.googlesource.com/c/1364695
Commit-Queue: Siyu An <siyua@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarJared Saul <jsaul@google.com>
Cr-Commit-Position: refs/heads/master@{#625435}
parent 6f4e2c0b
...@@ -8,17 +8,21 @@ ...@@ -8,17 +8,21 @@
#include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/browser/field_types.h"
// This defines an enumeration of IDs that can uniquely identify a view within // This defines an enumeration of IDs that can uniquely identify a view within
// the scope of the local and upload credit card save bubbles. // the scope of the local and upload credit card save bubbles as well as the
// local card migration bubble and dialogs.
namespace autofill { namespace autofill {
enum DialogViewId : int { enum DialogViewId : int {
VIEW_ID_NONE = 0, VIEW_ID_NONE = 0,
// The following are the important containing views of the bubble. // The following views are contained in SaveCardBubbleViews.
MAIN_CONTENT_VIEW_LOCAL, // The main content view, for a local save bubble MAIN_CONTENT_VIEW_LOCAL, // The main content view for a local
MAIN_CONTENT_VIEW_UPLOAD, // The main content view, for an upload save bubble // save bubble
FOOTNOTE_VIEW, // Contains the legal messages for upload save MAIN_CONTENT_VIEW_UPLOAD, // The main content view for an upload
// save bubble
FOOTNOTE_VIEW, // The footnote view of either an upload
// save bubble or a manage cards view.
SIGN_IN_PROMO_VIEW, // Contains the sign-in promo view SIGN_IN_PROMO_VIEW, // Contains the sign-in promo view
MANAGE_CARDS_VIEW, // The manage cards view MANAGE_CARDS_VIEW, // The manage cards view
EXPIRATION_DATE_VIEW, // Contains the dropdowns for expiration date EXPIRATION_DATE_VIEW, // Contains the dropdowns for expiration date
...@@ -26,6 +30,12 @@ enum DialogViewId : int { ...@@ -26,6 +30,12 @@ enum DialogViewId : int {
// The sub-view that contains the sign-in button in the promo. // The sub-view that contains the sign-in button in the promo.
SIGN_IN_VIEW, SIGN_IN_VIEW,
// The main content view for a migration offer bubble.
MAIN_CONTENT_VIEW_MIGRATION_BUBBLE,
// The main content view for the main migration dialog.
MAIN_CONTENT_VIEW_MIGRATION_OFFER_DIALOG,
// The following are views::LabelButton objects (clickable). // The following are views::LabelButton objects (clickable).
OK_BUTTON, // Can say [Save], [Next], [Confirm], OK_BUTTON, // Can say [Save], [Next], [Confirm],
// or [Done] depending on context // or [Done] depending on context
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <ctime>
#include <list>
#include <memory>
#include <string>
#include <utility>
#include "base/callback_list.h"
#include "base/command_line.h"
#include "base/macros.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/signin/account_fetcher_service_factory.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/fake_account_fetcher_service_builder.h"
#include "chrome/browser/signin/fake_signin_manager_builder.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
#include "chrome/browser/ui/autofill/local_card_migration_bubble_controller_impl.h"
#include "chrome/browser/ui/autofill/local_card_migration_dialog_controller_impl.h"
#include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/location_bar/location_bar.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/autofill/dialog_view_ids.h"
#include "chrome/browser/ui/views/autofill/local_card_migration_bubble_views.h"
#include "chrome/browser/ui/views/autofill/local_card_migration_dialog_view.h"
#include "chrome/browser/ui/views/autofill/local_card_migration_icon_view.h"
#include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/credit_card_save_manager.h"
#include "components/autofill/core/browser/form_data_importer.h"
#include "components/autofill/core/browser/local_card_migration_manager.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/test_event_waiter.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/browser/fake_account_fetcher_service.h"
#include "components/sync/test/fake_server/fake_server.h"
#include "components/sync/test/fake_server/fake_server_network_resources.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "services/device/public/cpp/test/scoped_geolocation_overrider.h"
#include "services/identity/public/cpp/identity_manager.h"
#include "services/identity/public/cpp/identity_test_utils.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/base_event_utils.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/window/dialog_client_view.h"
using base::Bucket;
using testing::ElementsAre;
namespace autofill {
namespace {
constexpr char kURLGetUploadDetailsRequest[] =
"https://payments.google.com/payments/apis/chromepaymentsservice/"
"getdetailsforsavecard";
constexpr char kResponseGetUploadDetailsSuccess[] =
"{\"legal_message\":{\"line\":[{\"template\":\"Legal message template with "
"link: "
"{0}.\",\"template_parameter\":[{\"display_text\":\"Link\",\"url\":\"https:"
"//www.example.com/\"}]}]},\"context_token\":\"dummy_context_token\"}";
constexpr char kResponseGetUploadDetailsFailure[] =
"{\"error\":{\"code\":\"FAILED_PRECONDITION\",\"user_error_message\":\"An "
"unexpected error has occurred. Please try again later.\"}}";
constexpr char kCreditCardFormURL[] =
"/credit_card_upload_form_address_and_cc.html";
constexpr char kFirstCardNumber[] = "5428424047572420"; // Mastercard
constexpr char kSecondCardNumber[] = "4782187095085933"; // Visa
constexpr double kFakeGeolocationLatitude = 1.23;
constexpr double kFakeGeolocationLongitude = 4.56;
} // namespace
class LocalCardMigrationBrowserTest
: public SyncTest,
public LocalCardMigrationManager::ObserverForTest {
protected:
// Various events that can be waited on by the DialogEventWaiter.
enum class DialogEvent : int {
REQUESTED_LOCAL_CARD_MIGRATION,
RECEIVED_GET_UPLOAD_DETAILS_RESPONSE,
SENT_MIGRATE_CARDS_REQUEST,
RECEIVED_MIGRATE_CARDS_RESPONSE
};
LocalCardMigrationBrowserTest() : SyncTest(SINGLE_CLIENT) {}
~LocalCardMigrationBrowserTest() override {}
void SetUpOnMainThread() override {
SyncTest::SetUpOnMainThread();
// Set up the HTTPS server (uses the embedded_test_server).
ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
embedded_test_server()->ServeFilesFromSourceDirectory(
"components/test/data/autofill");
embedded_test_server()->StartAcceptingConnections();
ProfileSyncServiceFactory::GetForProfile(browser()->profile())
->OverrideNetworkResourcesForTest(
std::make_unique<fake_server::FakeServerNetworkResources>(
GetFakeServer()->AsWeakPtr()));
std::string username;
#if defined(OS_CHROMEOS)
// In ChromeOS browser tests, the profile may already by authenticated with
// stub account |user_manager::kStubUserEmail|.
AccountInfo info =
IdentityManagerFactory::GetForProfile(browser()->profile())
->GetPrimaryAccountInfo();
username = info.email;
#endif
if (username.empty())
username = "user@gmail.com";
harness_ = ProfileSyncServiceHarness::Create(
browser()->profile(), username, "password",
ProfileSyncServiceHarness::SigninType::FAKE_SIGNIN);
// Set up the URL loader factory for the payments client so we can intercept
// those network requests too.
test_shared_loader_factory_ =
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
&test_url_loader_factory_);
ContentAutofillDriver::GetForRenderFrameHost(
GetActiveWebContents()->GetMainFrame())
->autofill_manager()
->client()
->GetPaymentsClient()
->set_url_loader_factory_for_testing(test_shared_loader_factory_);
// Set up this class as the ObserverForTest implementation.
LocalCardMigrationManager* local_card_migration_manager =
ContentAutofillDriver::GetForRenderFrameHost(
GetActiveWebContents()->GetMainFrame())
->autofill_manager()
->client()
->GetFormDataImporter()
->local_card_migration_manager_.get();
local_card_migration_manager->SetEventObserverForTesting(this);
personal_data_ = local_card_migration_manager->personal_data_manager_;
// Set up the fake geolocation data.
geolocation_overrider_ =
std::make_unique<device::ScopedGeolocationOverrider>(
kFakeGeolocationLatitude, kFakeGeolocationLongitude);
// Set up billing customer ID.
ContentAutofillDriver::GetForRenderFrameHost(
GetActiveWebContents()->GetMainFrame())
->autofill_manager()
->client()
->GetPrefs()
->SetDouble(prefs::kAutofillBillingCustomerNumber, 1234);
scoped_feature_list_.InitAndEnableFeature(
features::kAutofillCreditCardLocalCardMigration);
ASSERT_TRUE(harness_->SetupSync());
SetUploadDetailsRpcPaymentsAccepts();
}
void NavigateTo(const std::string& file_path) {
ui_test_utils::NavigateToURL(
browser(), file_path.find("data:") == 0U
? GURL(file_path)
: embedded_test_server()->GetURL(file_path));
}
void OnDecideToRequestLocalCardMigration() override {
if (event_waiter_)
event_waiter_->OnEvent(DialogEvent::REQUESTED_LOCAL_CARD_MIGRATION);
}
void OnReceivedGetUploadDetailsResponse() override {
if (event_waiter_)
event_waiter_->OnEvent(DialogEvent::RECEIVED_GET_UPLOAD_DETAILS_RESPONSE);
}
void OnSentMigrateCardsRequest() override {
if (event_waiter_)
event_waiter_->OnEvent(DialogEvent::SENT_MIGRATE_CARDS_REQUEST);
}
void OnReceivedMigrateCardsResponse() override {
if (event_waiter_)
event_waiter_->OnEvent(DialogEvent::RECEIVED_MIGRATE_CARDS_RESPONSE);
}
void SaveLocalCard(std::string card_number) {
CreditCard local_card;
test::SetCreditCardInfo(&local_card, "John Smith", card_number.c_str(),
"12", test::NextYear().c_str(), "1");
local_card.set_guid("00000000-0000-0000-0000-" + card_number.substr(0, 12));
local_card.set_record_type(CreditCard::LOCAL_CARD);
personal_data_->AddCreditCard(local_card);
}
void SaveServerCard(std::string card_number) {
CreditCard server_card;
test::SetCreditCardInfo(&server_card, "John Smith", card_number.c_str(),
"12", test::NextYear().c_str(), "1");
server_card.set_guid("00000000-0000-0000-0000-" +
card_number.substr(0, 12));
server_card.set_record_type(CreditCard::FULL_SERVER_CARD);
server_card.set_server_id("full_id_" + card_number);
personal_data_->AddFullServerCreditCard(server_card);
}
void UseCardAndWaitForMigrationOffer(std::string card_number) {
// Reusing a card should show the migration offer bubble.
ResetEventWaiterForSequence(
{DialogEvent::REQUESTED_LOCAL_CARD_MIGRATION,
DialogEvent::RECEIVED_GET_UPLOAD_DETAILS_RESPONSE});
FillAndSubmitFormWithCard(card_number);
WaitForObservedEvent();
}
void FillAndSubmitFormWithCard(std::string card_number) {
NavigateTo(kCreditCardFormURL);
content::WebContents* web_contents = GetActiveWebContents();
const std::string click_fill_button_js =
"(function() { document.getElementById('fill_form').click(); })();";
ASSERT_TRUE(content::ExecuteScript(web_contents, click_fill_button_js));
const std::string fill_cc_number_js =
"(function() { document.getElementsByName(\"cc_number\")[0].value = " +
card_number + "; })();";
ASSERT_TRUE(content::ExecuteScript(web_contents, fill_cc_number_js));
const std::string click_submit_button_js =
"(function() { document.getElementById('submit').click(); })();";
content::TestNavigationObserver nav_observer(web_contents);
ASSERT_TRUE(content::ExecuteScript(web_contents, click_submit_button_js));
nav_observer.Wait();
}
void SetUploadDetailsRpcPaymentsAccepts() {
test_url_loader_factory()->AddResponse(kURLGetUploadDetailsRequest,
kResponseGetUploadDetailsSuccess);
}
void SetUploadDetailsRpcPaymentsDeclines() {
test_url_loader_factory()->AddResponse(kURLGetUploadDetailsRequest,
kResponseGetUploadDetailsFailure);
}
void ClickOnView(views::View* view) {
DCHECK(view);
ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
view->OnMousePressed(pressed);
ui::MouseEvent released_event =
ui::MouseEvent(ui::ET_MOUSE_RELEASED, gfx::Point(), gfx::Point(),
ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
ui::EF_LEFT_MOUSE_BUTTON);
view->OnMouseReleased(released_event);
}
void ClickOnDialogViewAndWait(
views::View* view,
views::DialogDelegateView* local_card_migration_view) {
DCHECK(local_card_migration_view);
views::test::WidgetDestroyedWaiter destroyed_waiter(
local_card_migration_view->GetWidget());
local_card_migration_view->GetDialogClientView()
->ResetViewShownTimeStampForTesting();
views::BubbleFrameView* bubble_frame_view =
static_cast<views::BubbleFrameView*>(
local_card_migration_view->GetWidget()
->non_client_view()
->frame_view());
bubble_frame_view->ResetViewShownTimeStampForTesting();
ClickOnView(view);
destroyed_waiter.Wait();
}
views::View* FindViewInDialogById(
DialogViewId view_id,
views::DialogDelegateView* local_card_migration_view) {
DCHECK(local_card_migration_view);
views::View* specified_view =
local_card_migration_view->GetViewByID(static_cast<int>(view_id));
if (!specified_view) {
specified_view =
local_card_migration_view->GetDialogClientView()->GetViewByID(
static_cast<int>(view_id));
}
return specified_view;
}
void ClickOnOkButton(views::DialogDelegateView* local_card_migration_view) {
views::View* ok_button =
local_card_migration_view->GetDialogClientView()->ok_button();
ClickOnDialogViewAndWait(ok_button, local_card_migration_view);
}
void ClickOnCancelButton(
views::DialogDelegateView* local_card_migration_view) {
views::View* cancel_button =
local_card_migration_view->GetDialogClientView()->cancel_button();
ClickOnDialogViewAndWait(cancel_button, local_card_migration_view);
}
views::DialogDelegateView* GetLocalCardMigrationOfferBubbleViews() {
LocalCardMigrationBubbleControllerImpl*
local_card_migration_bubble_controller_impl =
LocalCardMigrationBubbleControllerImpl::FromWebContents(
GetActiveWebContents());
if (!local_card_migration_bubble_controller_impl)
return nullptr;
return static_cast<LocalCardMigrationBubbleViews*>(
local_card_migration_bubble_controller_impl
->local_card_migration_bubble_view());
}
views::DialogDelegateView* GetLocalCardMigrationMainDialogView() {
LocalCardMigrationDialogControllerImpl*
local_card_migration_dialog_controller_impl =
LocalCardMigrationDialogControllerImpl::FromWebContents(
GetActiveWebContents());
if (!local_card_migration_dialog_controller_impl)
return nullptr;
return static_cast<LocalCardMigrationDialogView*>(
local_card_migration_dialog_controller_impl
->local_card_migration_dialog_view());
}
LocalCardMigrationIconView* GetLocalCardMigrationIconView() {
if (!browser())
return nullptr;
LocationBarView* location_bar_view =
static_cast<LocationBarView*>(browser()->window()->GetLocationBar());
DCHECK(location_bar_view->local_card_migration_icon_view());
return location_bar_view->local_card_migration_icon_view();
}
views::View* GetCloseButton() {
LocalCardMigrationBubbleViews* local_card_migration_bubble_views =
static_cast<LocalCardMigrationBubbleViews*>(
GetLocalCardMigrationOfferBubbleViews());
DCHECK(local_card_migration_bubble_views);
return local_card_migration_bubble_views->GetBubbleFrameView()
->GetCloseButtonForTest();
}
views::View* GetCardListView() {
return static_cast<LocalCardMigrationDialogView*>(
GetLocalCardMigrationMainDialogView())
->card_list_view_;
}
content::WebContents* GetActiveWebContents() {
return browser()->tab_strip_model()->GetActiveWebContents();
}
void ResetEventWaiterForSequence(std::list<DialogEvent> event_sequence) {
event_waiter_ =
std::make_unique<EventWaiter<DialogEvent>>(std::move(event_sequence));
}
void WaitForObservedEvent() { event_waiter_->Wait(); }
network::TestURLLoaderFactory* test_url_loader_factory() {
return &test_url_loader_factory_;
}
PersonalDataManager* personal_data_ = nullptr;
std::unique_ptr<
base::CallbackList<void(content::BrowserContext*)>::Subscription>
will_create_browser_context_services_subscription_;
base::test::ScopedFeatureList scoped_feature_list_;
std::unique_ptr<ProfileSyncServiceHarness> harness_;
private:
std::unique_ptr<autofill::EventWaiter<DialogEvent>> event_waiter_;
std::unique_ptr<net::FakeURLFetcherFactory> url_fetcher_factory_;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
std::unique_ptr<device::ScopedGeolocationOverrider> geolocation_overrider_;
DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationBrowserTest);
};
// Ensures that migration is not offered when user saves a new card.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
UsingNewCardDoesNotShowIntermediateMigrationOffer) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
FillAndSubmitFormWithCard(kSecondCardNumber);
// No migration bubble should be showing, because the single card upload
// bubble should be displayed instead.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// No metrics are recorded when migration is not offered.
histogram_tester.ExpectTotalCount(
"Autofill.LocalCardMigrationBubbleOffer.FirstShow", 0);
}
// Ensures that migration is not offered when payments declines the cards.
IN_PROC_BROWSER_TEST_F(
LocalCardMigrationBrowserTest,
IntermediateMigrationOfferDoesNotShowWhenPaymentsDeclines) {
base::HistogramTester histogram_tester;
SetUploadDetailsRpcPaymentsDeclines();
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
FillAndSubmitFormWithCard(kFirstCardNumber);
// No bubble should be showing.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// No metrics are recorded when migration is not offered.
histogram_tester.ExpectTotalCount(
"Autofill.LocalCardMigrationBubbleOffer.FirstShow", 0);
}
// Ensures that the intermediate migration bubble is not shown after reusing a
// saved server card, if there are no other cards to migrate.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ReusingServerCardDoesNotShowIntermediateMigrationOffer) {
base::HistogramTester histogram_tester;
SaveServerCard(kFirstCardNumber);
FillAndSubmitFormWithCard(kFirstCardNumber);
// No bubble should be showing.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// No metrics are recorded when migration is not offered.
histogram_tester.ExpectTotalCount(
"Autofill.LocalCardMigrationBubbleOffer.FirstShow", 0);
}
// Ensures that the intermediate migration bubble is not shown after reusing a
// previously saved local card, if there are no other cards to migrate.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ReusingLocalCardDoesNotShowIntermediateMigrationOffer) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
FillAndSubmitFormWithCard(kFirstCardNumber);
// No migration bubble should be showing, because the single card upload
// bubble should be displayed instead.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// No metrics are recorded when migration is not offered.
histogram_tester.ExpectTotalCount(
"Autofill.LocalCardMigrationBubbleOffer.FirstShow", 0);
}
// Ensures that the intermediate migration bubble is triggered after reusing a
// saved local card, if there are multiple local cards available to migrate.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ReusingLocalCardShowsIntermediateMigrationOffer) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
// The intermediate migration bubble should show.
EXPECT_TRUE(
FindViewInDialogById(DialogViewId::MAIN_CONTENT_VIEW_MIGRATION_BUBBLE,
GetLocalCardMigrationOfferBubbleViews())
->visible());
// Metrics
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationBubbleOffer.FirstShow"),
ElementsAre(
Bucket(AutofillMetrics::LOCAL_CARD_MIGRATION_BUBBLE_REQUESTED, 1),
Bucket(AutofillMetrics::LOCAL_CARD_MIGRATION_BUBBLE_SHOWN, 1)));
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard",
AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1);
}
// Ensures that clicking [X] on the offer bubble makes the bubble disappear.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ClickingCloseClosesBubble) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
ClickOnDialogViewAndWait(GetCloseButton(),
GetLocalCardMigrationOfferBubbleViews());
// No bubble should be showing.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// Metrics
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard",
AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1);
}
// Ensures that clicking on the credit card icon in the omnibox reopens the
// offer bubble after closing it.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ClickingOmniboxIconReshowsBubble) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
ClickOnDialogViewAndWait(GetCloseButton(),
GetLocalCardMigrationOfferBubbleViews());
ClickOnView(GetLocalCardMigrationIconView());
// Clicking the icon should reshow the bubble.
EXPECT_TRUE(
FindViewInDialogById(DialogViewId::MAIN_CONTENT_VIEW_MIGRATION_BUBBLE,
GetLocalCardMigrationOfferBubbleViews())
->visible());
// Metrics
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard"),
ElementsAre(Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1)));
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationBubbleOffer.Reshows"),
ElementsAre(
Bucket(AutofillMetrics::LOCAL_CARD_MIGRATION_BUBBLE_REQUESTED, 1),
Bucket(AutofillMetrics::LOCAL_CARD_MIGRATION_BUBBLE_SHOWN, 1)));
}
// Ensures that accepting the intermediate migration offer opens up the main
// migration dialog.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ClickingContinueOpensDialog) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
// Click the [Continue] button.
ClickOnOkButton(GetLocalCardMigrationOfferBubbleViews());
// Dialog should be visible.
EXPECT_TRUE(FindViewInDialogById(
DialogViewId::MAIN_CONTENT_VIEW_MIGRATION_OFFER_DIALOG,
GetLocalCardMigrationMainDialogView())
->visible());
// Intermediate bubble should be gone.
EXPECT_EQ(nullptr, GetLocalCardMigrationOfferBubbleViews());
// Metrics
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard"),
ElementsAre(Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1),
Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_ACCEPTED, 1),
Bucket(AutofillMetrics::MAIN_DIALOG_SHOWN, 1)));
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationBubbleUserInteraction.FirstShow",
AutofillMetrics::LOCAL_CARD_MIGRATION_BUBBLE_CLOSED_ACCEPTED, 1);
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationDialogOffer",
AutofillMetrics::LOCAL_CARD_MIGRATION_DIALOG_SHOWN, 1);
}
// Ensures that rejecting the main migration dialog closes the dialog.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ClickingCancelClosesDialog) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
// Click the [Continue] button.
ClickOnOkButton(GetLocalCardMigrationOfferBubbleViews());
// Click the [Cancel] button.
ClickOnCancelButton(GetLocalCardMigrationMainDialogView());
// No dialog should be showing.
EXPECT_EQ(nullptr, GetLocalCardMigrationMainDialogView());
// Metrics
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard"),
ElementsAre(Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1),
Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_ACCEPTED, 1),
Bucket(AutofillMetrics::MAIN_DIALOG_SHOWN, 1)));
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationDialogUserInteraction",
AutofillMetrics::LOCAL_CARD_MIGRATION_DIALOG_CLOSED_CANCEL_BUTTON_CLICKED,
1);
}
// Ensures that accepting the main migration dialog closes the dialog.
IN_PROC_BROWSER_TEST_F(LocalCardMigrationBrowserTest,
ClickingSaveClosesDialog) {
base::HistogramTester histogram_tester;
SaveLocalCard(kFirstCardNumber);
SaveLocalCard(kSecondCardNumber);
UseCardAndWaitForMigrationOffer(kFirstCardNumber);
// Click the [Continue] button in the bubble.
ClickOnOkButton(GetLocalCardMigrationOfferBubbleViews());
// Click the [Save] button in the dialog.
// TODO(crbug.com/897998): Add Payments Rpc setup and event waiter.
ClickOnOkButton(GetLocalCardMigrationMainDialogView());
// No dialog should be showing.
EXPECT_EQ(nullptr, GetLocalCardMigrationMainDialogView());
// Metrics
EXPECT_THAT(
histogram_tester.GetAllSamples(
"Autofill.LocalCardMigrationOrigin.UseOfLocalCard"),
ElementsAre(Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_SHOWN, 1),
Bucket(AutofillMetrics::INTERMEDIATE_BUBBLE_ACCEPTED, 1),
Bucket(AutofillMetrics::MAIN_DIALOG_SHOWN, 1),
Bucket(AutofillMetrics::MAIN_DIALOG_ACCEPTED, 1)));
histogram_tester.ExpectUniqueSample(
"Autofill.LocalCardMigrationDialogUserInteraction",
AutofillMetrics::LOCAL_CARD_MIGRATION_DIALOG_CLOSED_SAVE_BUTTON_CLICKED,
1);
}
// TODO(crbug.com/897998): Add these following tests.
// 1) Reusing a server card shows the intermediate bubble.
// 2) All valid cards are visible in the migration offer view.
// 3) Local cards should get deleted after migration.
// 4) Expired and invalid cards should not be shown.
// 5) When user navigates away after five seconds, the bubble disappears.
// 6) When user navigates away after five seconds, the dialog should stay.
// 7) When user clicks legal message links, browser should show a pop-up window.
// 8) Simulate checkboxes to ensure
// LocalCardMigrationDialogUserSelectionPercentage is logged correctly.
// 9) Ensure LocalCardMigrationDialogActiveDuration is logged correctly.
} // namespace autofill
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <stddef.h> #include <stddef.h>
#include <memory> #include <memory>
#include <utility>
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "build/build_config.h" #include "build/build_config.h"
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
#include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h" #include "ui/views/layout/fill_layout.h"
#include "ui/views/style/typography.h" #include "ui/views/style/typography.h"
#include "ui/views/window/dialog_client_view.h"
namespace autofill { namespace autofill {
...@@ -154,6 +156,7 @@ void LocalCardMigrationBubbleViews::Init() { ...@@ -154,6 +156,7 @@ void LocalCardMigrationBubbleViews::Init() {
explanatory_message->SetHorizontalAlignment(gfx::ALIGN_LEFT); explanatory_message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
explanatory_message->SetMultiLine(true); explanatory_message->SetMultiLine(true);
AddChildView(explanatory_message); AddChildView(explanatory_message);
set_id(DialogViewId::MAIN_CONTENT_VIEW_MIGRATION_BUBBLE);
} }
} // namespace autofill } // namespace autofill
...@@ -47,6 +47,8 @@ class LocalCardMigrationBubbleViews : public LocalCardMigrationBubble, ...@@ -47,6 +47,8 @@ class LocalCardMigrationBubbleViews : public LocalCardMigrationBubble,
void WindowClosing() override; void WindowClosing() override;
private: private:
friend class LocalCardMigrationBrowserTest;
~LocalCardMigrationBubbleViews() override; ~LocalCardMigrationBubbleViews() override;
// views::BubbleDialogDelegateView: // views::BubbleDialogDelegateView:
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#include "chrome/browser/ui/views/autofill/local_card_migration_dialog_view.h" #include "chrome/browser/ui/views/autofill/local_card_migration_dialog_view.h"
#include <memory>
#include <string>
#include <vector>
#include "base/i18n/message_formatter.h" #include "base/i18n/message_formatter.h"
#include "base/location.h" #include "base/location.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -311,6 +315,8 @@ class LocalCardMigrationOfferView : public views::View, ...@@ -311,6 +315,8 @@ class LocalCardMigrationOfferView : public views::View,
} }
private: private:
friend class LocalCardMigrationDialogView;
LocalCardMigrationDialogController* controller_; LocalCardMigrationDialogController* controller_;
views::View* card_list_view_ = nullptr; views::View* card_list_view_ = nullptr;
...@@ -467,6 +473,8 @@ void LocalCardMigrationDialogView::ConstructView() { ...@@ -467,6 +473,8 @@ void LocalCardMigrationDialogView::ConstructView() {
if (view_state == LocalCardMigrationDialogState::kOffered) { if (view_state == LocalCardMigrationDialogState::kOffered) {
offer_view_ = new LocalCardMigrationOfferView(controller_, this); offer_view_ = new LocalCardMigrationOfferView(controller_, this);
offer_view_->set_id(DialogViewId::MAIN_CONTENT_VIEW_MIGRATION_OFFER_DIALOG);
card_list_view_ = offer_view_->card_list_view_;
AddChildView(offer_view_); AddChildView(offer_view_);
} else { } else {
AddChildView(CreateFeedbackContentView(controller_, this).release()); AddChildView(CreateFeedbackContentView(controller_, this).release());
......
...@@ -51,7 +51,10 @@ class LocalCardMigrationDialogView : public LocalCardMigrationDialog, ...@@ -51,7 +51,10 @@ class LocalCardMigrationDialogView : public LocalCardMigrationDialog,
void UpdateLayout(); void UpdateLayout();
private: private:
friend class LocalCardMigrationBrowserTest;
void ConstructView(); void ConstructView();
base::string16 GetOkButtonLabel() const; base::string16 GetOkButtonLabel() const;
base::string16 GetCancelButtonLabel() const; base::string16 GetCancelButtonLabel() const;
...@@ -63,6 +66,10 @@ class LocalCardMigrationDialogView : public LocalCardMigrationDialog, ...@@ -63,6 +66,10 @@ class LocalCardMigrationDialogView : public LocalCardMigrationDialog,
// dialog is not in the 'offer' state. // dialog is not in the 'offer' state.
LocalCardMigrationOfferView* offer_view_ = nullptr; LocalCardMigrationOfferView* offer_view_ = nullptr;
// The view containing a list of cards. It is the content of the scroll bar.
// Owned by the LocalCardMigrationOfferView.
views::View* card_list_view_;
DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationDialogView); DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationDialogView);
}; };
......
...@@ -1539,6 +1539,7 @@ test("browser_tests") { ...@@ -1539,6 +1539,7 @@ test("browser_tests") {
"../browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc", "../browser/ui/views/autofill/autofill_popup_base_view_browsertest.cc",
"../browser/ui/views/autofill/card_unmask_prompt_view_tester_views.cc", "../browser/ui/views/autofill/card_unmask_prompt_view_tester_views.cc",
"../browser/ui/views/autofill/card_unmask_prompt_view_tester_views.h", "../browser/ui/views/autofill/card_unmask_prompt_view_tester_views.h",
"../browser/ui/views/autofill/local_card_migration_browsertest.cc",
"../browser/ui/views/autofill/save_card_bubble_views_browsertest.cc", "../browser/ui/views/autofill/save_card_bubble_views_browsertest.cc",
"../browser/ui/views/autofill/save_card_bubble_views_browsertest_base.cc", "../browser/ui/views/autofill/save_card_bubble_views_browsertest_base.cc",
"../browser/ui/views/autofill/save_card_bubble_views_browsertest_base.h", "../browser/ui/views/autofill/save_card_bubble_views_browsertest_base.h",
......
...@@ -124,6 +124,7 @@ class CreditCardSaveManager { ...@@ -124,6 +124,7 @@ class CreditCardSaveManager {
private: private:
friend class CreditCardSaveManagerTest; friend class CreditCardSaveManagerTest;
friend class CreditCardSaveManagerTestObserverBridge; friend class CreditCardSaveManagerTestObserverBridge;
friend class LocalCardMigrationBrowserTest;
friend class TestCreditCardSaveManager; friend class TestCreditCardSaveManager;
friend class SaveCardBubbleViewsBrowserTestBase; friend class SaveCardBubbleViewsBrowserTestBase;
......
...@@ -145,6 +145,7 @@ class FormDataImporter { ...@@ -145,6 +145,7 @@ class FormDataImporter {
friend class AutofillMergeTest; friend class AutofillMergeTest;
friend class FormDataImporterTest; friend class FormDataImporterTest;
friend class FormDataImporterTestBase; friend class FormDataImporterTestBase;
friend class LocalCardMigrationBrowserTest;
friend class SaveCardBubbleViewsBrowserTestBase; friend class SaveCardBubbleViewsBrowserTestBase;
friend class SaveCardInfobarEGTestHelper; friend class SaveCardInfobarEGTestHelper;
FRIEND_TEST_ALL_PREFIXES(AutofillMergeTest, MergeProfiles); FRIEND_TEST_ALL_PREFIXES(AutofillMergeTest, MergeProfiles);
......
...@@ -88,6 +88,9 @@ void LocalCardMigrationManager::AttemptToOfferLocalCardMigration( ...@@ -88,6 +88,9 @@ void LocalCardMigrationManager::AttemptToOfferLocalCardMigration(
return; return;
migration_request_ = payments::PaymentsClient::MigrationRequestDetails(); migration_request_ = payments::PaymentsClient::MigrationRequestDetails();
if (observer_for_testing_)
observer_for_testing_->OnDecideToRequestLocalCardMigration();
payments_client_->GetUploadDetails( payments_client_->GetUploadDetails(
std::vector<AutofillProfile>(), GetDetectedValues(), std::vector<AutofillProfile>(), GetDetectedValues(),
/*active_experiments=*/std::vector<const char*>(), app_locale_, /*active_experiments=*/std::vector<const char*>(), app_locale_,
...@@ -145,15 +148,25 @@ bool LocalCardMigrationManager::IsCreditCardMigrationEnabled() { ...@@ -145,15 +148,25 @@ bool LocalCardMigrationManager::IsCreditCardMigrationEnabled() {
bool migration_experiment_enabled = bool migration_experiment_enabled =
features::GetLocalCardMigrationExperimentalFlag() != features::GetLocalCardMigrationExperimentalFlag() !=
features::LocalCardMigrationExperimentalFlag::kMigrationDisabled; features::LocalCardMigrationExperimentalFlag::kMigrationDisabled;
bool credit_card_upload_enabled = ::autofill::IsCreditCardUploadEnabled(
// If |observer_for_testing_| is set, assume we are in a browsertest and
// credit card upload should be enabled by default. Cannot get around this as
// Chrome OS testing requires an unsupported email domain (i.e.
// stub-user@example.com).
bool credit_card_upload_enabled =
observer_for_testing_ ||
::autofill::IsCreditCardUploadEnabled(
client_->GetPrefs(), client_->GetSyncService(), client_->GetPrefs(), client_->GetSyncService(),
client_->GetIdentityManager()->GetPrimaryAccountInfo().email); client_->GetIdentityManager()->GetPrimaryAccountInfo().email);
bool has_google_payments_account = bool has_google_payments_account =
(payments::GetBillingCustomerId(personal_data_manager_, (payments::GetBillingCustomerId(personal_data_manager_,
payments_client_->GetPrefService()) != 0); payments_client_->GetPrefService()) != 0);
bool sync_feature_enabled = bool sync_feature_enabled =
(personal_data_manager_->GetSyncSigninState() == (personal_data_manager_->GetSyncSigninState() ==
AutofillSyncSigninState::kSignedInAndSyncFeature); AutofillSyncSigninState::kSignedInAndSyncFeature);
return migration_experiment_enabled && credit_card_upload_enabled && return migration_experiment_enabled && credit_card_upload_enabled &&
has_google_payments_account && sync_feature_enabled; has_google_payments_account && sync_feature_enabled;
} }
...@@ -163,6 +176,9 @@ void LocalCardMigrationManager::OnDidGetUploadDetails( ...@@ -163,6 +176,9 @@ void LocalCardMigrationManager::OnDidGetUploadDetails(
AutofillClient::PaymentsRpcResult result, AutofillClient::PaymentsRpcResult result,
const base::string16& context_token, const base::string16& context_token,
std::unique_ptr<base::Value> legal_message) { std::unique_ptr<base::Value> legal_message) {
if (observer_for_testing_)
observer_for_testing_->OnReceivedGetUploadDetailsResponse();
if (result == AutofillClient::SUCCESS) { if (result == AutofillClient::SUCCESS) {
migration_request_.context_token = context_token; migration_request_.context_token = context_token;
legal_message_ = base::DictionaryValue::From(std::move(legal_message)); legal_message_ = base::DictionaryValue::From(std::move(legal_message));
...@@ -196,6 +212,9 @@ void LocalCardMigrationManager::OnDidMigrateLocalCards( ...@@ -196,6 +212,9 @@ void LocalCardMigrationManager::OnDidMigrateLocalCards(
AutofillClient::PaymentsRpcResult result, AutofillClient::PaymentsRpcResult result,
std::unique_ptr<std::unordered_map<std::string, std::string>> save_result, std::unique_ptr<std::unordered_map<std::string, std::string>> save_result,
const std::string& display_text) { const std::string& display_text) {
if (observer_for_testing_)
observer_for_testing_->OnReceivedMigrateCardsResponse();
if (!save_result) if (!save_result)
return; return;
...@@ -254,6 +273,9 @@ void LocalCardMigrationManager::OnDidGetMigrationRiskData( ...@@ -254,6 +273,9 @@ void LocalCardMigrationManager::OnDidGetMigrationRiskData(
// Send the migration request. Will call payments_client to create a new // Send the migration request. Will call payments_client to create a new
// PaymentsRequest. Also create a new callback function OnDidMigrateLocalCards. // PaymentsRequest. Also create a new callback function OnDidMigrateLocalCards.
void LocalCardMigrationManager::SendMigrateLocalCardsRequest() { void LocalCardMigrationManager::SendMigrateLocalCardsRequest() {
if (observer_for_testing_)
observer_for_testing_->OnSentMigrateCardsRequest();
migration_request_.app_locale = app_locale_; migration_request_.app_locale = app_locale_;
migration_request_.billing_customer_number = payments::GetBillingCustomerId( migration_request_.billing_customer_number = payments::GetBillingCustomerId(
personal_data_manager_, payments_client_->GetPrefService()); personal_data_manager_, payments_client_->GetPrefService());
......
...@@ -43,7 +43,7 @@ class MigratableCreditCard { ...@@ -43,7 +43,7 @@ class MigratableCreditCard {
FAILURE_ON_UPLOAD, FAILURE_ON_UPLOAD,
}; };
MigratableCreditCard(const CreditCard& credit_card); explicit MigratableCreditCard(const CreditCard& credit_card);
~MigratableCreditCard(); ~MigratableCreditCard();
CreditCard credit_card() const { return credit_card_; } CreditCard credit_card() const { return credit_card_; }
...@@ -66,6 +66,16 @@ class MigratableCreditCard { ...@@ -66,6 +66,16 @@ class MigratableCreditCard {
// Owned by FormDataImporter. // Owned by FormDataImporter.
class LocalCardMigrationManager { class LocalCardMigrationManager {
public: public:
// An observer class used by browsertests that gets notified whenever
// particular actions occur.
class ObserverForTest {
public:
virtual void OnDecideToRequestLocalCardMigration() = 0;
virtual void OnReceivedGetUploadDetailsResponse() = 0;
virtual void OnSentMigrateCardsRequest() = 0;
virtual void OnReceivedMigrateCardsResponse() = 0;
};
// The parameters should outlive the LocalCardMigrationManager. // The parameters should outlive the LocalCardMigrationManager.
LocalCardMigrationManager(AutofillClient* client, LocalCardMigrationManager(AutofillClient* client,
payments::PaymentsClient* payments_client, payments::PaymentsClient* payments_client,
...@@ -141,6 +151,7 @@ class LocalCardMigrationManager { ...@@ -141,6 +151,7 @@ class LocalCardMigrationManager {
payments::PaymentsClient* payments_client_; payments::PaymentsClient* payments_client_;
private: private:
friend class LocalCardMigrationBrowserTest;
FRIEND_TEST_ALL_PREFIXES(LocalCardMigrationManagerTest, FRIEND_TEST_ALL_PREFIXES(LocalCardMigrationManagerTest,
MigrateCreditCard_MigrationPermanentFailure); MigrateCreditCard_MigrationPermanentFailure);
FRIEND_TEST_ALL_PREFIXES(LocalCardMigrationManagerTest, FRIEND_TEST_ALL_PREFIXES(LocalCardMigrationManagerTest,
...@@ -161,6 +172,11 @@ class LocalCardMigrationManager { ...@@ -161,6 +172,11 @@ class LocalCardMigrationManager {
// Finalizes the migration request and calls PaymentsClient. // Finalizes the migration request and calls PaymentsClient.
void SendMigrateLocalCardsRequest(); void SendMigrateLocalCardsRequest();
// For testing.
void SetEventObserverForTesting(ObserverForTest* observer) {
observer_for_testing_ = observer;
}
std::unique_ptr<base::DictionaryValue> legal_message_; std::unique_ptr<base::DictionaryValue> legal_message_;
std::string app_locale_; std::string app_locale_;
...@@ -187,6 +203,9 @@ class LocalCardMigrationManager { ...@@ -187,6 +203,9 @@ class LocalCardMigrationManager {
// Record the triggering source of the local card migration. // Record the triggering source of the local card migration.
AutofillMetrics::LocalCardMigrationOrigin local_card_migration_origin_; AutofillMetrics::LocalCardMigrationOrigin local_card_migration_origin_;
// Initialized only during tests.
ObserverForTest* observer_for_testing_ = nullptr;
base::WeakPtrFactory<LocalCardMigrationManager> weak_ptr_factory_; base::WeakPtrFactory<LocalCardMigrationManager> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationManager); DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationManager);
......
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