Commit f3714abe authored by Yunke Zhou's avatar Yunke Zhou Committed by Commit Bot

Oobe: update gaia url for child specific sign in

Add new gaia end point for child account signin / signup
DD: https://docs.google.com/document/d/1NJFsv7Mugy2ssYmyc3-Qh8_Ra5zwfKdeyYCFQ8WeAlQ

Bug: 1101318
Change-Id: Ia6769f01dfe9f1409ee120b9cc71ab66ae658963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359073
Commit-Queue: Yunke Zhou <yunkez@google.com>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799570}
parent 0b93b0bb
...@@ -47,9 +47,20 @@ void GaiaScreen::MaybePreloadAuthExtension() { ...@@ -47,9 +47,20 @@ void GaiaScreen::MaybePreloadAuthExtension() {
} }
void GaiaScreen::LoadOnline(const AccountId& account) { void GaiaScreen::LoadOnline(const AccountId& account) {
view_->SetGaiaPath(GaiaView::GaiaPath::kDefault);
view_->LoadGaiaAsync(account); view_->LoadGaiaAsync(account);
} }
void GaiaScreen::LoadOnlineForChildSignup() {
view_->SetGaiaPath(GaiaView::GaiaPath::kChildSignup);
view_->LoadGaiaAsync(EmptyAccountId());
}
void GaiaScreen::LoadOnlineForChildSignin() {
view_->SetGaiaPath(GaiaView::GaiaPath::kChildSignin);
view_->LoadGaiaAsync(EmptyAccountId());
}
void GaiaScreen::LoadOffline(const AccountId& account) { void GaiaScreen::LoadOffline(const AccountId& account) {
view_->LoadOfflineGaia(account); view_->LoadOfflineGaia(account);
} }
...@@ -59,6 +70,7 @@ void GaiaScreen::ShowImpl() { ...@@ -59,6 +70,7 @@ void GaiaScreen::ShowImpl() {
} }
void GaiaScreen::HideImpl() { void GaiaScreen::HideImpl() {
view_->SetGaiaPath(GaiaView::GaiaPath::kDefault);
view_->LoadGaiaAsync(EmptyAccountId()); view_->LoadGaiaAsync(EmptyAccountId());
view_->Hide(); view_->Hide();
} }
......
...@@ -36,6 +36,10 @@ class GaiaScreen : public BaseScreen { ...@@ -36,6 +36,10 @@ class GaiaScreen : public BaseScreen {
void MaybePreloadAuthExtension(); void MaybePreloadAuthExtension();
// Loads online Gaia into the webview. // Loads online Gaia into the webview.
void LoadOnline(const AccountId& account); void LoadOnline(const AccountId& account);
// Loads online Gaia (for child signup) into the webview.
void LoadOnlineForChildSignup();
// Loads online Gaia (for child signin) into the webview.
void LoadOnlineForChildSignin();
// Loads offline version of Gaia. // Loads offline version of Gaia.
void LoadOffline(const AccountId& account); void LoadOffline(const AccountId& account);
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
#include "chrome/browser/chromeos/login/screens/user_creation_screen.h" #include "chrome/browser/chromeos/login/screens/user_creation_screen.h"
#include "ash/public/cpp/login_screen_test_api.h" #include "ash/public/cpp/login_screen_test_api.h"
#include "chrome/browser/chromeos/login/enrollment/enrollment_screen_view.h"
#include "chrome/browser/chromeos/login/oobe_screen.h" #include "chrome/browser/chromeos/login/oobe_screen.h"
#include "chrome/browser/chromeos/login/test/device_state_mixin.h" #include "chrome/browser/chromeos/login/test/device_state_mixin.h"
#include "chrome/browser/chromeos/login/test/fake_gaia_mixin.h"
#include "chrome/browser/chromeos/login/test/js_checker.h" #include "chrome/browser/chromeos/login/test/js_checker.h"
#include "chrome/browser/chromeos/login/test/login_manager_mixin.h" #include "chrome/browser/chromeos/login/test/login_manager_mixin.h"
#include "chrome/browser/chromeos/login/test/oobe_base_test.h" #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
...@@ -13,6 +15,7 @@ ...@@ -13,6 +15,7 @@
#include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h" #include "chrome/browser/chromeos/login/ui/login_display_host.h"
#include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.h"
#include "chromeos/constants/chromeos_features.h" #include "chromeos/constants/chromeos_features.h"
#include "content/public/test/browser_test.h" #include "content/public/test/browser_test.h"
...@@ -100,6 +103,7 @@ class UserCreationScreenTest : public OobeBaseTest { ...@@ -100,6 +103,7 @@ class UserCreationScreenTest : public OobeBaseTest {
UserCreationScreen::ScreenExitCallback original_callback_; UserCreationScreen::ScreenExitCallback original_callback_;
base::test::ScopedFeatureList feature_list_; base::test::ScopedFeatureList feature_list_;
FakeGaiaMixin fake_gaia_{&mixin_host_, embedded_test_server()};
}; };
// Verify flow for setting up the device for self. // Verify flow for setting up the device for self.
...@@ -110,6 +114,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, SignInForSelf) { ...@@ -110,6 +114,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, SignInForSelf) {
->get_wizard_context_for_testing() ->get_wizard_context_for_testing()
->sign_in_as_child); ->sign_in_as_child);
EXPECT_EQ(screen_result_.value(), UserCreationScreen::Result::SIGNIN); EXPECT_EQ(screen_result_.value(), UserCreationScreen::Result::SIGNIN);
OobeScreenWaiter(GaiaView::kScreenId).Wait();
} }
// Verify flow for setting up the device for a child with a newly created gaia // Verify flow for setting up the device for a child with a newly created gaia
...@@ -126,6 +131,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, CreateAccountForChild) { ...@@ -126,6 +131,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, CreateAccountForChild) {
->is_child_gaia_account_new); ->is_child_gaia_account_new);
EXPECT_EQ(screen_result_.value(), EXPECT_EQ(screen_result_.value(),
UserCreationScreen::Result::CHILD_ACCOUNT_CREATE); UserCreationScreen::Result::CHILD_ACCOUNT_CREATE);
OobeScreenWaiter(GaiaView::kScreenId).Wait();
} }
// Verify flow for setting up the device for a child with an existing gaia // Verify flow for setting up the device for a child with an existing gaia
...@@ -141,6 +147,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, SignInForChild) { ...@@ -141,6 +147,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, SignInForChild) {
->get_wizard_context_for_testing() ->get_wizard_context_for_testing()
->is_child_gaia_account_new); ->is_child_gaia_account_new);
EXPECT_EQ(screen_result_.value(), UserCreationScreen::Result::CHILD_SIGNIN); EXPECT_EQ(screen_result_.value(), UserCreationScreen::Result::CHILD_SIGNIN);
OobeScreenWaiter(GaiaView::kScreenId).Wait();
} }
// Verify back button is hidden during the oobe flow (when no existing users). // Verify back button is hidden during the oobe flow (when no existing users).
...@@ -163,6 +170,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, EnterpriseEnroll) { ...@@ -163,6 +170,7 @@ IN_PROC_BROWSER_TEST_F(UserCreationScreenTest, EnterpriseEnroll) {
WaitForScreenExit(); WaitForScreenExit();
EXPECT_EQ(screen_result_.value(), EXPECT_EQ(screen_result_.value(),
UserCreationScreen::Result::ENTERPRISE_ENROLL); UserCreationScreen::Result::ENTERPRISE_ENROLL);
OobeScreenWaiter(EnrollmentScreenView::kScreenId).Wait();
} }
class UserCreationScreenLoginTest : public UserCreationScreenTest { class UserCreationScreenLoginTest : public UserCreationScreenTest {
......
...@@ -834,13 +834,11 @@ void WizardController::OnUserCreationScreenExit( ...@@ -834,13 +834,11 @@ void WizardController::OnUserCreationScreenExit(
AdvanceToScreen(GaiaView::kScreenId); AdvanceToScreen(GaiaView::kScreenId);
break; break;
case UserCreationScreen::Result::CHILD_SIGNIN: case UserCreationScreen::Result::CHILD_SIGNIN:
// TODO(crbug.com/1101318): entry point for child sign in screen GaiaScreen::Get(screen_manager())->LoadOnlineForChildSignin();
GaiaScreen::Get(screen_manager())->LoadOnline(EmptyAccountId());
AdvanceToScreen(GaiaView::kScreenId); AdvanceToScreen(GaiaView::kScreenId);
break; break;
case UserCreationScreen::Result::CHILD_ACCOUNT_CREATE: case UserCreationScreen::Result::CHILD_ACCOUNT_CREATE:
// TODO(crbug.com/1101318): entry point for account creation screen GaiaScreen::Get(screen_manager())->LoadOnlineForChildSignup();
GaiaScreen::Get(screen_manager())->LoadOnline(EmptyAccountId());
AdvanceToScreen(GaiaView::kScreenId); AdvanceToScreen(GaiaView::kScreenId);
break; break;
case UserCreationScreen::Result::ENTERPRISE_ENROLL: case UserCreationScreen::Result::ENTERPRISE_ENROLL:
......
...@@ -553,6 +553,26 @@ void GaiaScreenHandler::LoadGaiaWithPartitionAndVersionAndConsent( ...@@ -553,6 +553,26 @@ void GaiaScreenHandler::LoadGaiaWithPartitionAndVersionAndConsent(
} }
params.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec()); params.SetString("gaiaUrl", GaiaUrls::GetInstance()->gaia_url().spec());
switch (gaia_path_) {
case GaiaPath::kDefault:
// Use the default gaia signin path embedded/setup/v2/chromeos which is
// set in authenticator.js
break;
case GaiaPath::kChildSignup:
params.SetString("gaiaPath",
GaiaUrls::GetInstance()
->embedded_setup_chromeos_kid_signup_url()
.path()
.substr(1));
break;
case GaiaPath::kChildSignin:
params.SetString("gaiaPath",
GaiaUrls::GetInstance()
->embedded_setup_chromeos_kid_signin_url()
.path()
.substr(1));
break;
}
// We only send |chromeos_board| Gaia URL parameter if user has opted into // We only send |chromeos_board| Gaia URL parameter if user has opted into
// sending device statistics. // sending device statistics.
...@@ -1316,6 +1336,10 @@ void GaiaScreenHandler::Unbind() { ...@@ -1316,6 +1336,10 @@ void GaiaScreenHandler::Unbind() {
BaseScreenHandler::SetBaseScreen(nullptr); BaseScreenHandler::SetBaseScreen(nullptr);
} }
void GaiaScreenHandler::SetGaiaPath(GaiaScreenHandler::GaiaPath gaia_path) {
gaia_path_ = gaia_path;
}
void GaiaScreenHandler::LoadGaiaAsync(const AccountId& account_id) { void GaiaScreenHandler::LoadGaiaAsync(const AccountId& account_id) {
if (account_id.is_valid()) if (account_id.is_valid())
populated_account_id_ = account_id; populated_account_id_ = account_id;
......
...@@ -48,6 +48,12 @@ class GaiaScreen; ...@@ -48,6 +48,12 @@ class GaiaScreen;
class GaiaView { class GaiaView {
public: public:
enum class GaiaPath {
kDefault,
kChildSignup,
kChildSignin,
};
constexpr static StaticOobeScreenId kScreenId{"gaia-signin"}; constexpr static StaticOobeScreenId kScreenId{"gaia-signin"};
GaiaView() = default; GaiaView() = default;
...@@ -74,6 +80,8 @@ class GaiaView { ...@@ -74,6 +80,8 @@ class GaiaView {
virtual void Bind(GaiaScreen* screen) = 0; virtual void Bind(GaiaScreen* screen) = 0;
// Unbinds the screen from the view. // Unbinds the screen from the view.
virtual void Unbind() = 0; virtual void Unbind() = 0;
// Sets Gaia path for sign-in, child sign-in or child sign-up.
virtual void SetGaiaPath(GaiaPath gaia_path) = 0;
// Show sign-in screen for the given credentials. |services| is a list of // Show sign-in screen for the given credentials. |services| is a list of
// services returned by userInfo call as JSON array. Should be an empty array // services returned by userInfo call as JSON array. Should be an empty array
...@@ -132,6 +140,7 @@ class GaiaScreenHandler : public BaseScreenHandler, ...@@ -132,6 +140,7 @@ class GaiaScreenHandler : public BaseScreenHandler,
void Hide() override; void Hide() override;
void Bind(GaiaScreen* screen) override; void Bind(GaiaScreen* screen) override;
void Unbind() override; void Unbind() override;
void SetGaiaPath(GaiaPath gaia_path) override;
void ShowSigninScreenForTest(const std::string& username, void ShowSigninScreenForTest(const std::string& username,
const std::string& password, const std::string& password,
const std::string& services) override; const std::string& services) override;
...@@ -455,6 +464,8 @@ class GaiaScreenHandler : public BaseScreenHandler, ...@@ -455,6 +464,8 @@ class GaiaScreenHandler : public BaseScreenHandler,
// canceled by the user. // canceled by the user.
bool was_security_token_pin_canceled_ = false; bool was_security_token_pin_canceled_ = false;
GaiaPath gaia_path_ = GaiaPath::kDefault;
bool hidden_ = true; bool hidden_ = true;
// Handler for |samlChallengeMachineKey| request. // Handler for |samlChallengeMachineKey| request.
......
...@@ -230,6 +230,14 @@ void FakeGaia::Initialize() { ...@@ -230,6 +230,14 @@ void FakeGaia::Initialize() {
REGISTER_RESPONSE_HANDLER(gaia_urls->embedded_setup_chromeos_url(2), REGISTER_RESPONSE_HANDLER(gaia_urls->embedded_setup_chromeos_url(2),
HandleEmbeddedSetupChromeos); HandleEmbeddedSetupChromeos);
// Handles /embedded/setup/kidsignup/chromeos GAIA call.
REGISTER_RESPONSE_HANDLER(gaia_urls->embedded_setup_chromeos_kid_signup_url(),
HandleEmbeddedSetupChromeos);
// Handles /embedded/setup/kidsignin/chromeos GAIA call.
REGISTER_RESPONSE_HANDLER(gaia_urls->embedded_setup_chromeos_kid_signin_url(),
HandleEmbeddedSetupChromeos);
// Handles /OAuthLogin GAIA call. // Handles /OAuthLogin GAIA call.
REGISTER_RESPONSE_HANDLER( REGISTER_RESPONSE_HANDLER(
gaia_urls->oauth1_login_url(), HandleOAuthLogin); gaia_urls->oauth1_login_url(), HandleOAuthLogin);
......
...@@ -32,6 +32,10 @@ const char kDefaultOAuthAccountManagerBaseUrl[] = ...@@ -32,6 +32,10 @@ const char kDefaultOAuthAccountManagerBaseUrl[] =
const char kClientLoginUrlSuffix[] = "ClientLogin"; const char kClientLoginUrlSuffix[] = "ClientLogin";
const char kServiceLoginUrlSuffix[] = "ServiceLogin"; const char kServiceLoginUrlSuffix[] = "ServiceLogin";
const char kEmbeddedSetupChromeOsUrlSuffixV2[] = "embedded/setup/v2/chromeos"; const char kEmbeddedSetupChromeOsUrlSuffixV2[] = "embedded/setup/v2/chromeos";
const char kEmbeddedSetupChromeOsKidSignupUrlSuffix[] =
"embedded/setup/kidsignup/chromeos";
const char kEmbeddedSetupChromeOsKidSigninUrlSuffix[] =
"embedded/setup/kidsignin/chromeos";
const char kEmbeddedSetupWindowsUrlSuffix[] = "embedded/setup/windows"; const char kEmbeddedSetupWindowsUrlSuffix[] = "embedded/setup/windows";
// Parameter "ssp=1" is used to skip showing the password bubble when a user // Parameter "ssp=1" is used to skip showing the password bubble when a user
// signs in to Chrome. Note that Gaia will pass this client specified parameter // signs in to Chrome. Note that Gaia will pass this client specified parameter
...@@ -164,6 +168,14 @@ const GURL& GaiaUrls::embedded_setup_chromeos_url(unsigned version) const { ...@@ -164,6 +168,14 @@ const GURL& GaiaUrls::embedded_setup_chromeos_url(unsigned version) const {
return embedded_setup_chromeos_url_v2_; return embedded_setup_chromeos_url_v2_;
} }
const GURL& GaiaUrls::embedded_setup_chromeos_kid_signup_url() const {
return embedded_setup_chromeos_kid_signup_url_;
}
const GURL& GaiaUrls::embedded_setup_chromeos_kid_signin_url() const {
return embedded_setup_chromeos_kid_signin_url_;
}
const GURL& GaiaUrls::embedded_setup_windows_url() const { const GURL& GaiaUrls::embedded_setup_windows_url() const {
return embedded_setup_windows_url_; return embedded_setup_windows_url_;
} }
...@@ -329,6 +341,10 @@ void GaiaUrls::InitializeDefault() { ...@@ -329,6 +341,10 @@ void GaiaUrls::InitializeDefault() {
ResolveURLIfInvalid(&service_login_url_, gaia_url_, kServiceLoginUrlSuffix); ResolveURLIfInvalid(&service_login_url_, gaia_url_, kServiceLoginUrlSuffix);
ResolveURLIfInvalid(&embedded_setup_chromeos_url_v2_, gaia_url_, ResolveURLIfInvalid(&embedded_setup_chromeos_url_v2_, gaia_url_,
kEmbeddedSetupChromeOsUrlSuffixV2); kEmbeddedSetupChromeOsUrlSuffixV2);
ResolveURLIfInvalid(&embedded_setup_chromeos_kid_signup_url_, gaia_url_,
kEmbeddedSetupChromeOsKidSignupUrlSuffix);
ResolveURLIfInvalid(&embedded_setup_chromeos_kid_signin_url_, gaia_url_,
kEmbeddedSetupChromeOsKidSigninUrlSuffix);
ResolveURLIfInvalid(&embedded_setup_windows_url_, gaia_url_, ResolveURLIfInvalid(&embedded_setup_windows_url_, gaia_url_,
kEmbeddedSetupWindowsUrlSuffix); kEmbeddedSetupWindowsUrlSuffix);
ResolveURLIfInvalid(&signin_chrome_sync_dice_, gaia_url_, ResolveURLIfInvalid(&signin_chrome_sync_dice_, gaia_url_,
...@@ -400,6 +416,10 @@ void GaiaUrls::InitializeFromConfig() { ...@@ -400,6 +416,10 @@ void GaiaUrls::InitializeFromConfig() {
config->GetURLIfExists(URL_KEY_AND_PTR(client_login_url)); config->GetURLIfExists(URL_KEY_AND_PTR(client_login_url));
config->GetURLIfExists(URL_KEY_AND_PTR(service_login_url)); config->GetURLIfExists(URL_KEY_AND_PTR(service_login_url));
config->GetURLIfExists(URL_KEY_AND_PTR(embedded_setup_chromeos_url_v2)); config->GetURLIfExists(URL_KEY_AND_PTR(embedded_setup_chromeos_url_v2));
config->GetURLIfExists(
URL_KEY_AND_PTR(embedded_setup_chromeos_kid_signup_url));
config->GetURLIfExists(
URL_KEY_AND_PTR(embedded_setup_chromeos_kid_signin_url));
config->GetURLIfExists(URL_KEY_AND_PTR(embedded_setup_windows_url)); config->GetURLIfExists(URL_KEY_AND_PTR(embedded_setup_windows_url));
config->GetURLIfExists(URL_KEY_AND_PTR(signin_chrome_sync_dice)); config->GetURLIfExists(URL_KEY_AND_PTR(signin_chrome_sync_dice));
config->GetURLIfExists(URL_KEY_AND_PTR(signin_chrome_sync_keys_url)); config->GetURLIfExists(URL_KEY_AND_PTR(signin_chrome_sync_keys_url));
......
...@@ -26,6 +26,8 @@ class GaiaUrls { ...@@ -26,6 +26,8 @@ class GaiaUrls {
const GURL& client_login_url() const; const GURL& client_login_url() const;
const GURL& service_login_url() const; const GURL& service_login_url() const;
const GURL& embedded_setup_chromeos_url(unsigned version) const; const GURL& embedded_setup_chromeos_url(unsigned version) const;
const GURL& embedded_setup_chromeos_kid_signup_url() const;
const GURL& embedded_setup_chromeos_kid_signin_url() const;
const GURL& embedded_setup_windows_url() const; const GURL& embedded_setup_windows_url() const;
const GURL& signin_chrome_sync_dice() const; const GURL& signin_chrome_sync_dice() const;
const GURL& signin_chrome_sync_keys_url() const; const GURL& signin_chrome_sync_keys_url() const;
...@@ -82,6 +84,8 @@ class GaiaUrls { ...@@ -82,6 +84,8 @@ class GaiaUrls {
GURL client_login_url_; GURL client_login_url_;
GURL service_login_url_; GURL service_login_url_;
GURL embedded_setup_chromeos_url_v2_; GURL embedded_setup_chromeos_url_v2_;
GURL embedded_setup_chromeos_kid_signup_url_;
GURL embedded_setup_chromeos_kid_signin_url_;
GURL embedded_setup_windows_url_; GURL embedded_setup_windows_url_;
GURL signin_chrome_sync_dice_; GURL signin_chrome_sync_dice_;
GURL signin_chrome_sync_keys_url_; GURL signin_chrome_sync_keys_url_;
......
...@@ -71,6 +71,10 @@ TEST_F(GaiaUrlsTest, InitializeDefault_AllUrls) { ...@@ -71,6 +71,10 @@ TEST_F(GaiaUrlsTest, InitializeDefault_AllUrls) {
"https://accounts.google.com/ServiceLogin"); "https://accounts.google.com/ServiceLogin");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(), EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(),
"https://accounts.google.com/embedded/setup/v2/chromeos"); "https://accounts.google.com/embedded/setup/v2/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signup_url().spec(),
"https://accounts.google.com/embedded/setup/kidsignup/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signin_url().spec(),
"https://accounts.google.com/embedded/setup/kidsignin/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(), EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(),
"https://accounts.google.com/embedded/setup/windows"); "https://accounts.google.com/embedded/setup/windows");
EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(), EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(),
...@@ -155,6 +159,10 @@ TEST_F(GaiaUrlsTest, InitializeDefault_URLSwitches) { ...@@ -155,6 +159,10 @@ TEST_F(GaiaUrlsTest, InitializeDefault_URLSwitches) {
"https://test-gaia.com/ServiceLogin"); "https://test-gaia.com/ServiceLogin");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(), EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(),
"https://test-gaia.com/embedded/setup/v2/chromeos"); "https://test-gaia.com/embedded/setup/v2/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signup_url().spec(),
"https://test-gaia.com/embedded/setup/kidsignup/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signin_url().spec(),
"https://test-gaia.com/embedded/setup/kidsignin/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(), EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(),
"https://test-gaia.com/embedded/setup/windows"); "https://test-gaia.com/embedded/setup/windows");
EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(), EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(),
...@@ -277,6 +285,10 @@ TEST_F(GaiaUrlsTest, InitializeFromConfig_AllUrls) { ...@@ -277,6 +285,10 @@ TEST_F(GaiaUrlsTest, InitializeFromConfig_AllUrls) {
"https://accounts.example.com/ServiceLogin"); "https://accounts.example.com/ServiceLogin");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(), EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_url(2U).spec(),
"https://accounts.example.com/embedded/setup/v2/chromeos"); "https://accounts.example.com/embedded/setup/v2/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signup_url().spec(),
"https://accounts.example.com/embedded/setup/kidsignup/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_chromeos_kid_signin_url().spec(),
"https://accounts.example.com/embedded/setup/kidsignin/chromeos");
EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(), EXPECT_EQ(gaia_urls()->embedded_setup_windows_url().spec(),
"https://accounts.example.com/embedded/setup/windows"); "https://accounts.example.com/embedded/setup/windows");
EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(), EXPECT_EQ(gaia_urls()->signin_chrome_sync_dice().spec(),
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
"embedded_setup_chromeos_url_v2": { "embedded_setup_chromeos_url_v2": {
"url": "https://accounts.example.com/embedded/setup/v2/chromeos" "url": "https://accounts.example.com/embedded/setup/v2/chromeos"
}, },
"embedded_setup_chromeos_kid_signup_url": {
"url": "https://accounts.example.com/embedded/setup/kidsignup/chromeos"
},
"embedded_setup_chromeos_kid_signin_url": {
"url": "https://accounts.example.com/embedded/setup/kidsignin/chromeos"
},
"embedded_setup_windows_url": { "embedded_setup_windows_url": {
"url": "https://accounts.example.com/embedded/setup/windows" "url": "https://accounts.example.com/embedded/setup/windows"
}, },
......
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