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 "components/rappor/rappor_utils.h" | |
6 | |
7 #include "components/rappor/rappor_service.h" | |
8 #include "testing/gtest/include/gtest/gtest.h" | |
9 #include "url/gurl.h" | |
10 | |
11 namespace rappor { | |
12 | |
13 // Make sure we don't crash with a null service. | |
14 TEST(RapporUtilsTest, NullServiceTest) { | |
15 SampleDomainAndRegistryFromHost(NULL, "", ""); | |
Peter Kasting
2014/06/06 02:05:48
Nit: Use std::string() in place of "" (many places
Steven Holte
2014/06/06 21:00:51
Done.
| |
16 SampleDomainAndRegistryFromGURL(NULL, "", GURL()); | |
17 } | |
18 | |
19 // Make sure recording a sample doesn't cause a crash. | |
20 TEST(RapporUtilsTest, SmokeTest) { | |
21 RapporService service; | |
22 SampleDomainAndRegistryFromHost(&service, "", ""); | |
23 SampleDomainAndRegistryFromGURL(&service, "", GURL()); | |
24 } | |
25 | |
26 } // namespace rappor | |
OLD | NEW |