[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / signin / signin_promo_unittest.cc
blob97c79b96fe95cb7d1a3d4f227f6dbb519232e080
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"
8 #include "url/gurl.h"
10 namespace signin {
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 */,
25 GURL());
26 EXPECT_TRUE(GetNextPageURLForPromoURL(promo_url).is_empty());
29 } // namespace signin