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 "base/memory/scoped_ptr.h" | |
6 #include "base/message_loop/message_loop.h" | |
7 #include "base/prefs/testing_pref_service.h" | |
8 #include "chromecast/metrics/cast_metrics_service_client.h" | |
Alexei Svitkine (slow)
2014/08/29 17:58:29
Nit: Chromium convention is now for this to be the
gunsch
2014/08/29 18:26:05
Done.
gunsch
2014/08/29 18:26:47
Actually, had to put this back. It seems for unit
Alexei Svitkine (slow)
2014/08/29 18:43:15
Odd. Which presubmit?
It certainly doesn't for ot
| |
9 #include "components/metrics/metrics_service.h" | |
10 #include "testing/gtest/include/gtest/gtest.h" | |
11 | |
12 namespace chromecast { | |
13 | |
14 class CastMetricsTest : public testing::Test { | |
15 protected: | |
16 virtual void SetUp() OVERRIDE { | |
17 message_loop_.reset(new base::MessageLoop()); | |
18 prefs_.reset(new TestingPrefServiceSimple()); | |
19 ::metrics::MetricsService::RegisterPrefs(prefs_->registry()); | |
20 } | |
21 | |
22 virtual void TearDown() OVERRIDE { | |
23 } | |
24 | |
Alexei Svitkine (slow)
2014/08/29 17:58:29
Nit: Not sure you need to override this.
gunsch
2014/08/29 18:26:04
Done.
| |
25 scoped_ptr<base::MessageLoop> message_loop_; | |
Alexei Svitkine (slow)
2014/08/29 17:58:29
Nit: Put a private: section above these and add DI
gunsch
2014/08/29 18:26:05
Done.
| |
26 scoped_ptr<TestingPrefServiceSimple> prefs_; | |
27 }; | |
28 | |
29 TEST_F(CastMetricsTest, CreateMetricsServiceClient) { | |
30 // Create and expect this to not crash. | |
31 metrics::CastMetricsServiceClient::Create(prefs_.get(), NULL); | |
32 } | |
33 | |
34 } // namespace chromecast | |
OLD | NEW |