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

Side by Side Diff: content/public/test/test_browser_thread_bundle_unittest.cc

Issue 2859283002: Revert of Support base::test::ScopedTaskEnvironment and content::TestBrowserThreadBundle in the same scope. (Closed)
Patch Set: Created 3 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 | « content/public/test/test_browser_thread_bundle.cc ('k') | content/test/BUILD.gn » ('j') | 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 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 "Check failed");
27 }
28
29 TEST(TestBrowserThreadBundleTest, MultipleTestBrowserThreadBundle) {
30 TestBrowserThreadBundle test_browser_thread_bundle;
31 EXPECT_DEATH({ TestBrowserThreadBundle other_test_browser_thread_bundle; },
32 "Check failed");
33 }
34
35 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_browser_thread_bundle.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698