| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #include "chrome/browser/signin/signin_promo.h" | |
| 6 | |
| 7 #include "testing/gtest/include/gtest/gtest.h" | |
| 8 #include "url/gurl.h" | |
| 9 | |
| 10 namespace signin { | |
| 11 | |
| 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)); | |
| 19 } | |
| 20 | |
| 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()); | |
| 27 } | |
| 28 | |
| 29 } // namespace signin | |
| OLD | NEW |