OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 "content/public/test/test_browser_thread_bundle.h" | |
6 | |
7 #include "base/message_loop/message_loop.h" | |
8 #include "base/test/gtest_util.h" | |
9 #include "base/test/scoped_task_environment.h" | |
10 #include "testing/gtest/include/gtest/gtest.h" | |
11 | |
12 namespace content { | |
13 | |
14 TEST(TestBrowserThreadBundle, MessageLoopForUIAndTestBrowserThreadBundle) { | |
15 base::MessageLoopForUI message_loop; | |
16 TestBrowserThreadBundle test_browser_thread_bundle; | |
gab
2017/05/03 15:33:10
I don't think we need to support this use case.
fdoray
2017/05/03 17:03:50
Done.
| |
17 } | |
18 | |
19 TEST(TestBrowserThreadBundle, ScopedTaskEnvironmentAndTestBrowserThreadBundle) { | |
20 base::test::ScopedTaskEnvironment scoped_task_environment( | |
21 base::test::ScopedTaskEnvironment::MainThreadType::UI); | |
22 TestBrowserThreadBundle test_browser_thread_bundle; | |
23 } | |
24 | |
25 TEST(TestBrowserThreadBundleTest, MessageLoopTypeMismatch) { | |
26 base::MessageLoopForUI message_loop; | |
27 EXPECT_DCHECK_DEATH({ | |
28 TestBrowserThreadBundle test_browser_thread_bundle( | |
29 TestBrowserThreadBundle::IO_MAINLOOP); | |
30 }); | |
31 } | |
32 | |
33 TEST(TestBrowserThreadBundleTest, MultipleTestBrowserThreadBundle) { | |
34 TestBrowserThreadBundle test_browser_thread_bundle; | |
35 EXPECT_DCHECK_DEATH( | |
36 { TestBrowserThreadBundle other_test_browser_thread_bundle; }); | |
37 } | |
38 | |
39 } // namespace content | |
OLD | NEW |