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

Side by Side Diff: chrome/browser/net/quota_policy_channel_id_store_unittest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/net/quota_policy_channel_id_store.h" 5 #include "chrome/browser/net/quota_policy_channel_id_store.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::ThreadTaskRunnerHandle::Get(), 61 base::ThreadTaskRunnerHandle::Get(),
62 NULL); 62 NULL);
63 std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>> 63 std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>>
64 channel_ids; 64 channel_ids;
65 Load(&channel_ids); 65 Load(&channel_ids);
66 ASSERT_EQ(0u, channel_ids.size()); 66 ASSERT_EQ(0u, channel_ids.size());
67 } 67 }
68 68
69 void TearDown() override { 69 void TearDown() override {
70 store_ = NULL; 70 store_ = NULL;
71 loop_.RunUntilIdle(); 71 base::RunLoop().RunUntilIdle();
72 } 72 }
73 73
74 base::ScopedTempDir temp_dir_; 74 base::ScopedTempDir temp_dir_;
75 scoped_refptr<QuotaPolicyChannelIDStore> store_; 75 scoped_refptr<QuotaPolicyChannelIDStore> store_;
76 std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>> 76 std::vector<std::unique_ptr<net::DefaultChannelIDStore::ChannelID>>
77 channel_ids_; 77 channel_ids_;
78 base::MessageLoop loop_; 78 base::MessageLoop loop_;
79 }; 79 };
80 80
81 // Test if data is stored as expected in the QuotaPolicy database. 81 // Test if data is stored as expected in the QuotaPolicy database.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 base::ThreadTaskRunnerHandle::Get(), 192 base::ThreadTaskRunnerHandle::Get(),
193 NULL); 193 NULL);
194 194
195 // Reload and check that the nonpersistent.com channel IDs have been removed. 195 // Reload and check that the nonpersistent.com channel IDs have been removed.
196 Load(&channel_ids); 196 Load(&channel_ids);
197 ASSERT_EQ(2U, channel_ids.size()); 197 ASSERT_EQ(2U, channel_ids.size());
198 for (const auto& id : channel_ids) { 198 for (const auto& id : channel_ids) {
199 ASSERT_NE("nonpersistent.com", id->server_identifier()); 199 ASSERT_NE("nonpersistent.com", id->server_identifier());
200 } 200 }
201 } 201 }
OLDNEW
« no previous file with comments | « chrome/browser/net/predictor_browsertest.cc ('k') | chrome/browser/password_manager/password_store_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698