1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/signin/signin_promo.h"
7 #include "testing/gtest/include/gtest/gtest.h"
12 TEST(SigninPromoTest
, GetNextPageURLForPromoURL_ValidContinueURL
) {
13 GURL promo_url
= GetPromoURLWithContinueURL(SOURCE_MENU
,
14 false /* auto_close */,
15 false /* is_constrained */,
16 GURL("https://www.example.com"));
17 EXPECT_EQ(GURL("https://www.example.com"),
18 GetNextPageURLForPromoURL(promo_url
));
21 TEST(SigninPromoTest
, GetNextPageURLForPromoURL_EmptyContinueURL
) {
22 GURL promo_url
= GetPromoURLWithContinueURL(SOURCE_MENU
,
23 false /* auto_close */,
24 false /* is_constrained */,
26 EXPECT_TRUE(GetNextPageURLForPromoURL(promo_url
).is_empty());