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

Side by Side Diff: blimp/engine/app/blimp_system_url_request_context_getter_unittest.cc

Issue 1960813002: Fix DCHECK failure and add unittest for BlimpSystemURLContextGetter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/app/blimp_system_url_request_context_getter.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/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
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_system_url_request_context_getter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698