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

Side by Side Diff: blimp/engine/common/blimp_browser_context_unittest.cc

Issue 1945393002: Create and integrate a metrics service client into Blimp engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow up on comments. Created 4 years, 7 months 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
« no previous file with comments | « blimp/engine/common/blimp_browser_context.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 "blimp/engine/common/blimp_browser_context.h"
6
7 #include "base/message_loop/message_loop.h"
8 #include "base/metrics/user_metrics.h"
9 #include "components/metrics/metrics_service.h"
10 #include "content/public/test/test_browser_thread_bundle.h"
11 #include "net/log/net_log.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13
14 namespace blimp {
15 namespace engine {
16
17 class BlimpBrowserContextTest : public testing::Test {
18 public:
19 BlimpBrowserContextTest() {}
20
21 protected:
22 void SetUp() override {
23 base::SetRecordActionTaskRunner(
24 base::MessageLoop::current()->task_runner());
25 // Create BlimpBrowserContext.
26 browser_context_.reset(new BlimpBrowserContext(false /* off_the_record */,
27 &net_log_));
28 }
29
30 void TearDown() override {
31 // Clears static variable in MetricsService
32 metrics::MetricsService::SetExecutionPhase(
33 metrics::MetricsService::UNINITIALIZED_PHASE,
34 browser_context_->GetPrefService());
35 }
36
37 private:
38 content::TestBrowserThreadBundle thread_bundle_;
39 net::NetLog net_log_;
40 std::unique_ptr<BlimpBrowserContext> browser_context_;
41
42 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContextTest);
43 };
44
45 TEST_F(BlimpBrowserContextTest, CtorDtor) {
46 // Covers construction and destruction of BlimpBrowserContext and
47 // associated metrics setup and teardown.
48 }
49
50 } // namespace engine
51 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/common/blimp_browser_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698