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/scoped_task_environment.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 TEST(TestBrowserThreadBundle, ScopedTaskEnvironmentAndTestBrowserThreadBundle) { |
| 14 base::test::ScopedTaskEnvironment scoped_task_environment( |
| 15 base::test::ScopedTaskEnvironment::MainThreadType::UI); |
| 16 TestBrowserThreadBundle test_browser_thread_bundle; |
| 17 } |
| 18 |
| 19 TEST(TestBrowserThreadBundleTest, MessageLoopTypeMismatch) { |
| 20 base::MessageLoopForUI message_loop; |
| 21 EXPECT_DEATH( |
| 22 { |
| 23 TestBrowserThreadBundle test_browser_thread_bundle( |
| 24 TestBrowserThreadBundle::IO_MAINLOOP); |
| 25 }, |
| 26 ""); |
| 27 } |
| 28 |
| 29 TEST(TestBrowserThreadBundleTest, MultipleTestBrowserThreadBundle) { |
| 30 TestBrowserThreadBundle test_browser_thread_bundle; |
| 31 EXPECT_DEATH({ TestBrowserThreadBundle other_test_browser_thread_bundle; }, |
| 32 ""); |
| 33 } |
| 34 |
| 35 } // namespace content |
OLD | NEW |