| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/rappor/rappor_utils.h" | 5 #include "components/rappor/public/rappor_utils.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "url/gurl.h" | 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace rappor { | 10 namespace rappor { |
| 11 | 11 |
| 12 // Test that extracting the sample works correctly for different schemes. | 12 // Test that extracting the sample works correctly for different schemes. |
| 13 TEST(RapporSamplingTest, GetDomainAndRegistrySampleFromGURLTest) { | 13 TEST(RapporSamplingTest, GetDomainAndRegistrySampleFromGURLTest) { |
| 14 EXPECT_EQ("google.com", GetDomainAndRegistrySampleFromGURL( | 14 EXPECT_EQ("google.com", GetDomainAndRegistrySampleFromGURL( |
| 15 GURL("https://www.GoOgLe.com:80/blah"))); | 15 GURL("https://www.GoOgLe.com:80/blah"))); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 33 GURL("http://www.corp/"))); | 33 GURL("http://www.corp/"))); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Make sure recording a sample during tests, when the Rappor service is NULL, | 36 // Make sure recording a sample during tests, when the Rappor service is NULL, |
| 37 // doesn't cause a crash. | 37 // doesn't cause a crash. |
| 38 TEST(RapporSamplingTest, SmokeTest) { | 38 TEST(RapporSamplingTest, SmokeTest) { |
| 39 SampleDomainAndRegistryFromGURL(NULL, std::string(), GURL()); | 39 SampleDomainAndRegistryFromGURL(NULL, std::string(), GURL()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace rappor | 42 } // namespace rappor |
| OLD | NEW |