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

Side by Side Diff: base/run_loop_unittest.cc

Issue 2857393006: Fix RunLoopTest.DisallowWaitingDeathTest for official builds. (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 | « no previous file | 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/run_loop.h" 5 #include "base/run_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 #if defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) 194 #if defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID)
195 TEST_F(RunLoopTest, DisallowWaitingDeathTest) { 195 TEST_F(RunLoopTest, DisallowWaitingDeathTest) {
196 EXPECT_TRUE(RunLoop::IsNestingAllowedOnCurrentThread()); 196 EXPECT_TRUE(RunLoop::IsNestingAllowedOnCurrentThread());
197 RunLoop::DisallowNestingOnCurrentThread(); 197 RunLoop::DisallowNestingOnCurrentThread();
198 EXPECT_FALSE(RunLoop::IsNestingAllowedOnCurrentThread()); 198 EXPECT_FALSE(RunLoop::IsNestingAllowedOnCurrentThread());
199 199
200 ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, Bind([]() { 200 ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, Bind([]() {
201 RunLoop nested_run_loop; 201 RunLoop nested_run_loop;
202 nested_run_loop.RunUntilIdle(); 202 nested_run_loop.RunUntilIdle();
203 })); 203 }));
204 EXPECT_DEATH({ run_loop_.RunUntilIdle(); }, "Check failed"); 204 EXPECT_DEATH({ run_loop_.RunUntilIdle(); }, "");
205 } 205 }
206 #endif // defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) 206 #endif // defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID)
207 207
208 } // namespace base 208 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698