Commit 3ac643d7 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Revert "WebUI NTP: redirect sign-in to chrome://newtab (reland)"

This reverts commit 8ba04bb7.

Reason for revert: DiceBrowserTest.EnableSyncAfterToken is failing.

Original change's description:
> WebUI NTP: redirect sign-in to chrome://newtab (reland)
> 
> This is a reland of 142274a8 with a fix
> for DiceBrowserTest.EnableSyncAfterToken. Original change's info:
> > Bug: 1015293
> > Change-Id: Ic76e7911403a925fa46a5b5fc58eca95fa292269
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209392
> > Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
> > Auto-Submit: Esmael Elmoslimany <aee@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#771116}
> 
> TBR=thestig@chromium.org
> 
> Bug: 1015293, 1085540
> Change-Id: I05450e311b9458b6927763cbf6b4c75c0621b56e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212818
> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#771246}

TBR=droger@chromium.org,thestig@chromium.org,tiborg@chromium.org,aee@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1015293, 1085540
Change-Id: Ic2d3ed8d4c34373fa200563b922a4b4af0b08abe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213643Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771459}
parent f733c15b
......@@ -28,7 +28,6 @@
#include "chrome/browser/policy/cloud/user_policy_signin_service_internal.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search/ntp_features.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/account_reconcilor_factory.h"
#include "chrome/browser/signin/chrome_device_id_helper.h"
......@@ -874,9 +873,7 @@ IN_PROC_BROWSER_TEST_F(DiceBrowserTest, EnableSyncAfterToken) {
dice_request_header_);
ui_test_utils::UrlLoadObserver ntp_url_observer(
base::FeatureList::IsEnabled(ntp_features::kWebUI)
? GURL(chrome::kChromeUINewTabPageURL)
: GURL(chrome::kChromeSearchLocalNtpUrl),
GURL(chrome::kChromeSearchLocalNtpUrl),
content::NotificationService::AllSources());
WaitForSigninSucceeded();
......@@ -937,7 +934,7 @@ IN_PROC_BROWSER_TEST_F(DiceBrowserTest, MAYBE_EnableSyncBeforeToken) {
dice_request_header_);
ui_test_utils::UrlLoadObserver ntp_url_observer(
GURL(chrome::kChromeUINewTabURL),
GURL(chrome::kChromeSearchLocalNtpUrl),
content::NotificationService::AllSources());
WaitForSigninSucceeded();
......
......@@ -24,7 +24,7 @@ namespace {
void RedirectToNtp(content::WebContents* contents) {
VLOG(1) << "RedirectToNtp";
contents->GetController().LoadURL(
GURL(chrome::kChromeUINewTabURL), content::Referrer(),
GURL(chrome::kChromeSearchLocalNtpUrl), content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
}
......
......@@ -240,8 +240,9 @@ TEST_P(ProcessDiceHeaderDelegateImplTestEnableSync, EnableSync) {
CreateDelegateAndNavigateToSignin(GetParam().signin_tab);
delegate->EnableSync(account_id_);
EXPECT_EQ(GetParam().callback_called, enable_sync_called_);
GURL expected_url =
GetParam().show_ntp ? GURL(chrome::kChromeUINewTabURL) : signin_url_;
GURL expected_url = GetParam().show_ntp
? GURL(chrome::kChromeSearchLocalNtpUrl)
: signin_url_;
EXPECT_EQ(expected_url, web_contents()->GetVisibleURL());
EXPECT_FALSE(show_error_called_);
// Check that the sync signin flow is complete.
......@@ -282,8 +283,9 @@ TEST_P(ProcessDiceHeaderDelegateImplTestHandleTokenExchangeFailure,
delegate->HandleTokenExchangeFailure(email_, auth_error_);
EXPECT_FALSE(enable_sync_called_);
EXPECT_EQ(GetParam().callback_called, show_error_called_);
GURL expected_url =
GetParam().show_ntp ? GURL(chrome::kChromeUINewTabURL) : signin_url_;
GURL expected_url = GetParam().show_ntp
? GURL(chrome::kChromeSearchLocalNtpUrl)
: signin_url_;
EXPECT_EQ(expected_url, web_contents()->GetVisibleURL());
// Check that the sync signin flow is complete.
if (GetParam().signin_tab) {
......
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