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/app/blimp_system_url_request_context_getter.h" | |
| 6 | |
| 7 #include "base/macros.h" | |
| 8 #include "base/memory/ref_counted.h" | |
| 9 #include "base/message_loop/message_loop.h" | |
| 10 #include "content/public/test/test_browser_thread.h" | |
| 11 #include "testing/gtest/include/gtest/gtest.h" | |
| 12 | |
| 13 namespace blimp { | |
| 14 namespace engine { | |
| 15 | |
| 16 namespace { | |
| 17 class BlimpSystemURLRequestContextGetterTest : public testing::Test { | |
| 18 public: | |
| 19 BlimpSystemURLRequestContextGetterTest() | |
| 20 : ui_thread_(content::BrowserThread::UI, &message_loop_), | |
| 21 io_thread_(content::BrowserThread::IO, &message_loop_), | |
| 22 system_url_request_context_getter_( | |
| 23 new BlimpSystemURLRequestContextGetter()) {} | |
| 24 | |
| 25 void TearDown() override { message_loop_.RunUntilIdle(); } | |
| 26 protected: | |
| 27 base::MessageLoopForUI message_loop_; | |
| 28 content::TestBrowserThread ui_thread_; | |
|
haibinlu
2016/05/07 01:53:34
content::TestBrowserThread is deprecated?
Jess
2016/05/09 17:31:42
Thanks for catching that. TestBrowserThreadBundle
| |
| 29 content::TestBrowserThread io_thread_; | |
| 30 scoped_refptr<BlimpSystemURLRequestContextGetter> | |
| 31 system_url_request_context_getter_; | |
| 32 }; | |
| 33 | |
| 34 TEST_F(BlimpSystemURLRequestContextGetterTest, GetURLRequestContext) { | |
| 35 ASSERT_NE(nullptr, | |
| 36 system_url_request_context_getter_->GetURLRequestContext()); | |
| 37 } | |
| 38 | |
| 39 } // namespace | |
| 40 | |
| 41 } // engine | |
| 42 } // blimp | |
| OLD | NEW |