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

Side by Side Diff: chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc Created 4 years, 6 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
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 klauncher_contacted_(false), kwallet_runnable_(true), 275 klauncher_contacted_(false), kwallet_runnable_(true),
276 kwallet_running_(true), kwallet_enabled_(true), 276 kwallet_running_(true), kwallet_enabled_(true),
277 desktop_env_(GetParam()) { 277 desktop_env_(GetParam()) {
278 } 278 }
279 279
280 void SetUp() override; 280 void SetUp() override;
281 void TearDown() override; 281 void TearDown() override;
282 282
283 // Let the DB thread run to completion of all current tasks. 283 // Let the DB thread run to completion of all current tasks.
284 void RunDBThread() { 284 void RunDBThread() {
285 base::WaitableEvent event(false, false); 285 base::WaitableEvent event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
286 base::WaitableEvent::InitialState::NOT_SIGNALED);
286 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 287 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
287 base::Bind(ThreadDone, &event)); 288 base::Bind(ThreadDone, &event));
288 event.Wait(); 289 event.Wait();
289 // Some of the tests may post messages to the UI thread, but we don't need 290 // Some of the tests may post messages to the UI thread, but we don't need
290 // to run those until after the DB thread is finished. So run it here. 291 // to run those until after the DB thread is finished. So run it here.
291 message_loop_.RunUntilIdle(); 292 message_loop_.RunUntilIdle();
292 } 293 }
293 static void ThreadDone(base::WaitableEvent* event) { 294 static void ThreadDone(base::WaitableEvent* event) {
294 event->Signal(); 295 event->Signal();
295 } 296 }
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 } 1385 }
1385 1386
1386 TEST_F(NativeBackendKWalletPickleTest, CheckVersion5Pickle) { 1387 TEST_F(NativeBackendKWalletPickleTest, CheckVersion5Pickle) {
1387 CheckVersion5Pickle(); 1388 CheckVersion5Pickle();
1388 } 1389 }
1389 1390
1390 TEST_F(NativeBackendKWalletPickleTest, CheckVersion6Pickle) { 1391 TEST_F(NativeBackendKWalletPickleTest, CheckVersion6Pickle) {
1391 CheckVersion6Pickle(false); 1392 CheckVersion6Pickle(false);
1392 CheckVersion6Pickle(true); 1393 CheckVersion6Pickle(true);
1393 } 1394 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698