Commit a1adcaa2 authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Commit Bot

Re-enable SigninSyncConfirmationTest and...

Re-enable SigninSyncConfirmationTest and ProfileMenuViewExtensionsTestWithScopedAccountConsistency tests.

This CLs removes chrome/test/data/webui/signin_browsertest.{h|cc} as
they are now obsolete. And it also re-enables SigninSyncConfirmationTest.Dialog
test as it should be working now.

Bug: 862573

Change-Id: I2de61f71ad7ba3935a358ea0d4d8a1864199e1bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1890077
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711181}
parent 13eb3668
......@@ -575,18 +575,9 @@ class ProfileMenuViewExtensionsTestWithScopedAccountConsistency
// Open the profile chooser to increment the Dice sign-in promo show counter
// below the threshold.
// TODO(https://crbug.com/862573): Re-enable when no longer failing when
// is_chrome_branded is true.
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#define MAYBE_IncrementDiceSigninPromoShowCounter \
DISABLED_IncrementDiceSigninPromoShowCounter
#else
#define MAYBE_IncrementDiceSigninPromoShowCounter \
IncrementDiceSigninPromoShowCounter
#endif
IN_PROC_BROWSER_TEST_F(
ProfileMenuViewExtensionsTestWithScopedAccountConsistency,
MAYBE_IncrementDiceSigninPromoShowCounter) {
IncrementDiceSigninPromoShowCounter) {
browser()->profile()->GetPrefs()->SetInteger(
prefs::kDiceSigninUserMenuPromoCount, 7);
ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser()));
......@@ -595,18 +586,9 @@ IN_PROC_BROWSER_TEST_F(
// The DICE sync illustration is shown only the first 10 times. This test
// ensures that the profile chooser is shown correctly above this threshold.
// TODO(https://crbug.com/862573): Re-enable when no longer failing when
// is_chrome_branded is true.
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#define MAYBE_DiceSigninPromoWithoutIllustration \
DISABLED_DiceSigninPromoWithoutIllustration
#else
#define MAYBE_DiceSigninPromoWithoutIllustration \
DiceSigninPromoWithoutIllustration
#endif
IN_PROC_BROWSER_TEST_F(
ProfileMenuViewExtensionsTestWithScopedAccountConsistency,
MAYBE_DiceSigninPromoWithoutIllustration) {
DiceSigninPromoWithoutIllustration) {
browser()->profile()->GetPrefs()->SetInteger(
prefs::kDiceSigninUserMenuPromoCount, 10);
ASSERT_NO_FATAL_FAILURE(OpenProfileMenuView(browser()));
......
......@@ -1368,8 +1368,6 @@ if (!is_android) {
"data/webui/history_ui_browsertest.h",
"data/webui/ntp4_browsertest.cc",
"data/webui/ntp4_browsertest.h",
"data/webui/signin_browsertest.cc",
"data/webui/signin_browsertest.h",
"data/webui/webui_resource_browsertest.cc",
"gpu/webgl_infobar_browsertest.cc",
"origin_policy/origin_policy_browsertest.cc",
......
......@@ -8,7 +8,6 @@
GEN_INCLUDE(['//chrome/test/data/webui/polymer_browser_test_base.js']);
GEN('#include "base/command_line.h"');
GEN('#include "build/branding_buildflags.h"');
GEN('#include "chrome/test/data/webui/signin_browsertest.h"');
GEN('#include "services/network/public/cpp/features.h"');
/**
......@@ -18,11 +17,6 @@ GEN('#include "services/network/public/cpp/features.h"');
*/
// eslint-disable-next-line no-var
var SigninSyncConfirmationTest = class extends PolymerTest {
/** @override */
get typedefCppFixture() {
return 'SigninBrowserTest';
}
/** @override */
get browsePreload() {
return 'chrome://sync-confirmation/test_loader.html?module=signin/sync_confirmation_test.js';
......@@ -42,13 +36,6 @@ var SigninSyncConfirmationTest = class extends PolymerTest {
}
};
// TODO(https://crbug.com/862573): Re-enable when no longer failing when
// is_chrome_branded is true.
GEN('#if BUILDFLAG(GOOGLE_CHROME_BRANDING)');
GEN('#define MAYBE_DialogWithDice DISABLED_DialogWithDice');
GEN('#else');
GEN('#define MAYBE_DialogWithDice');
GEN('#endif');
TEST_F('SigninSyncConfirmationTest', 'MAYBE_DialogWithDice', function() {
TEST_F('SigninSyncConfirmationTest', 'Dialog', function() {
mocha.run();
});
// Copyright 2017 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 "chrome/test/data/webui/signin_browsertest.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
SigninBrowserTest::SigninBrowserTest() {
EnableDice();
}
SigninBrowserTest::~SigninBrowserTest() {}
void SigninBrowserTest::EnableDice() {
scoped_account_consistency_ = std::make_unique<ScopedAccountConsistency>(
signin::AccountConsistencyMethod::kDice);
}
// Copyright 2017 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.
#ifndef CHROME_TEST_DATA_WEBUI_SIGNIN_BROWSERTEST_H_
#define CHROME_TEST_DATA_WEBUI_SIGNIN_BROWSERTEST_H_
#include "base/macros.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/signin/scoped_account_consistency.h"
#include "chrome/test/base/web_ui_browser_test.h"
class SigninBrowserTest : public WebUIBrowserTest {
public:
SigninBrowserTest();
~SigninBrowserTest() override;
protected:
void EnableDice();
private:
std::unique_ptr<ScopedAccountConsistency> scoped_account_consistency_;
DISALLOW_COPY_AND_ASSIGN(SigninBrowserTest);
};
#endif // CHROME_TEST_DATA_WEBUI_SIGNIN_BROWSERTEST_H_
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