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

Side by Side Diff: base/threading/thread_unittest.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. 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 | « no previous file | blimp/common/blob_cache/in_memory_blob_cache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/threading/thread.h" 5 #include "base/threading/thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 // Check the order of events during shutdown. 285 // Check the order of events during shutdown.
286 ASSERT_EQ(static_cast<size_t>(THREAD_NUM_EVENTS), captured_events.size()); 286 ASSERT_EQ(static_cast<size_t>(THREAD_NUM_EVENTS), captured_events.size());
287 EXPECT_EQ(THREAD_EVENT_INIT, captured_events[0]); 287 EXPECT_EQ(THREAD_EVENT_INIT, captured_events[0]);
288 EXPECT_EQ(THREAD_EVENT_CLEANUP, captured_events[1]); 288 EXPECT_EQ(THREAD_EVENT_CLEANUP, captured_events[1]);
289 EXPECT_EQ(THREAD_EVENT_MESSAGE_LOOP_DESTROYED, captured_events[2]); 289 EXPECT_EQ(THREAD_EVENT_MESSAGE_LOOP_DESTROYED, captured_events[2]);
290 } 290 }
291 291
292 TEST_F(ThreadTest, ThreadNotStarted) { 292 TEST_F(ThreadTest, ThreadNotStarted) {
293 Thread a("Inert"); 293 Thread a("Inert");
294 EXPECT_EQ(nullptr, a.task_runner()); 294 EXPECT_FALSE(a.task_runner());
295 } 295 }
296 296
297 TEST_F(ThreadTest, MultipleWaitUntilThreadStarted) { 297 TEST_F(ThreadTest, MultipleWaitUntilThreadStarted) {
298 Thread a("MultipleWaitUntilThreadStarted"); 298 Thread a("MultipleWaitUntilThreadStarted");
299 EXPECT_TRUE(a.Start()); 299 EXPECT_TRUE(a.Start());
300 // It's OK to call WaitUntilThreadStarted() multiple times. 300 // It's OK to call WaitUntilThreadStarted() multiple times.
301 EXPECT_TRUE(a.WaitUntilThreadStarted()); 301 EXPECT_TRUE(a.WaitUntilThreadStarted());
302 EXPECT_TRUE(a.WaitUntilThreadStarted()); 302 EXPECT_TRUE(a.WaitUntilThreadStarted());
303 } 303 }
OLDNEW
« no previous file with comments | « no previous file | blimp/common/blob_cache/in_memory_blob_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698