Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "base/run_loop.h" | |
| 10 #include "components/metrics/metrics_service.h" | |
| 11 #include "content/public/test/test_browser_thread_bundle.h" | |
| 12 #include "net/log/net_log.h" | |
| 13 #include "testing/gtest/include/gtest/gtest.h" | |
| 14 | |
| 15 namespace blimp { | |
| 16 namespace engine { | |
| 17 | |
| 18 class BlimpBrowserContextTest : public testing::Test { | |
| 19 public: | |
| 20 BlimpBrowserContextTest() {} | |
|
Bernhard Bauer
2016/05/10 08:51:42
You can just leave out the constructor if it's emp
Jess
2016/05/10 17:30:03
Done.
| |
| 21 protected: | |
| 22 void SetUp() override; | |
| 23 void TearDown() override; | |
| 24 private: | |
| 25 content::TestBrowserThreadBundle thread_bundle_; | |
| 26 net::NetLog net_log_; | |
| 27 std::unique_ptr<BlimpBrowserContext> browser_context_; | |
| 28 }; | |
| 29 | |
| 30 void BlimpBrowserContextTest::SetUp() { | |
| 31 base::SetRecordActionTaskRunner( | |
| 32 base::MessageLoop::current()->task_runner()); | |
| 33 // Create BlimpBrowserContext. | |
| 34 browser_context_.reset(new BlimpBrowserContext(false /* off_the_record */, | |
| 35 &net_log_)); | |
| 36 } | |
| 37 | |
| 38 void BlimpBrowserContextTest::TearDown() { | |
| 39 // Clears static variable in MetricsService | |
| 40 metrics::MetricsService::SetExecutionPhase( | |
| 41 metrics::MetricsService::UNINITIALIZED_PHASE, | |
| 42 browser_context_->GetPrefService()); | |
| 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 | |
| OLD | NEW |