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

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

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/location.h" 17 #include "base/location.h"
18 #include "base/pickle.h" 18 #include "base/pickle.h"
19 #include "base/run_loop.h"
19 #include "base/single_thread_task_runner.h" 20 #include "base/single_thread_task_runner.h"
20 #include "base/stl_util.h" 21 #include "base/stl_util.h"
21 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
22 #include "base/synchronization/waitable_event.h" 23 #include "base/synchronization/waitable_event.h"
23 #include "base/threading/thread_task_runner_handle.h" 24 #include "base/threading/thread_task_runner_handle.h"
24 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" 25 #include "chrome/browser/password_manager/native_backend_kwallet_x.h"
25 #include "chrome/test/base/testing_profile.h" 26 #include "chrome/test/base/testing_profile.h"
26 #include "components/autofill/core/common/password_form.h" 27 #include "components/autofill/core/common/password_form.h"
27 #include "components/password_manager/core/common/password_manager_pref_names.h" 28 #include "components/password_manager/core/common/password_manager_pref_names.h"
28 #include "components/prefs/pref_service.h" 29 #include "components/prefs/pref_service.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 .WillRepeatedly(Return(mock_kwallet_proxy_.get())); 408 .WillRepeatedly(Return(mock_kwallet_proxy_.get()));
408 } 409 }
409 410
410 EXPECT_CALL(*mock_session_bus_.get(), ShutdownAndBlock()).WillOnce(Return()) 411 EXPECT_CALL(*mock_session_bus_.get(), ShutdownAndBlock()).WillOnce(Return())
411 .WillRepeatedly(Return()); 412 .WillRepeatedly(Return());
412 } 413 }
413 414
414 void NativeBackendKWalletTest::TearDown() { 415 void NativeBackendKWalletTest::TearDown() {
415 base::ThreadTaskRunnerHandle::Get()->PostTask( 416 base::ThreadTaskRunnerHandle::Get()->PostTask(
416 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); 417 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
417 base::MessageLoop::current()->Run(); 418 base::RunLoop().Run();
418 db_thread_.Stop(); 419 db_thread_.Stop();
419 } 420 }
420 421
421 void NativeBackendKWalletTest::TestRemoveLoginsBetween( 422 void NativeBackendKWalletTest::TestRemoveLoginsBetween(
422 RemoveBetweenMethod date_to_test) { 423 RemoveBetweenMethod date_to_test) {
423 NativeBackendKWalletStub backend(42, desktop_env_); 424 NativeBackendKWalletStub backend(42, desktop_env_);
424 EXPECT_TRUE(backend.InitWithBus(mock_session_bus_)); 425 EXPECT_TRUE(backend.InitWithBus(mock_session_bus_));
425 426
426 form_google_.date_synced = base::Time(); 427 form_google_.date_synced = base::Time();
427 form_isc_.date_synced = base::Time(); 428 form_isc_.date_synced = base::Time();
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 CheckVersion7Pickle(); 1431 CheckVersion7Pickle();
1431 } 1432 }
1432 1433
1433 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) { 1434 TEST_F(NativeBackendKWalletPickleTest, CheckVersion8Pickle) {
1434 CheckVersion8Pickle(); 1435 CheckVersion8Pickle();
1435 } 1436 }
1436 1437
1437 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) { 1438 TEST_F(NativeBackendKWalletPickleTest, CheckVersion9Pickle) {
1438 CheckVersion9Pickle(); 1439 CheckVersion9Pickle();
1439 } 1440 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698