Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: components/rappor/rappor_utils_unittest.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix more compile errors in JNI files Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698