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

Side by Side Diff: services/shell/tests/shell/shell_unittest.cc

Issue 2104363004: Remove remaining calls to deprecated MessageLoop methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR gab Created 4 years, 5 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 | « remoting/test/protocol_perftest.cc ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 // 1. Launch a process. (Actually, have the runner launch a process that 177 // 1. Launch a process. (Actually, have the runner launch a process that
178 // launches a process.) 178 // launches a process.)
179 test::mojom::DriverPtr driver; 179 test::mojom::DriverPtr driver;
180 std::unique_ptr<Connection> connection = 180 std::unique_ptr<Connection> connection =
181 connector()->Connect("exe:shell_unittest_driver"); 181 connector()->Connect("exe:shell_unittest_driver");
182 connection->GetInterface(&driver); 182 connection->GetInterface(&driver);
183 183
184 // 2. Wait for the target to connect to us. (via 184 // 2. Wait for the target to connect to us. (via
185 // mojo:shell_unittest) 185 // mojo:shell_unittest)
186 base::MessageLoop::current()->Run(); 186 base::RunLoop().Run();
187 187
188 EXPECT_FALSE(connection->IsPending()); 188 EXPECT_FALSE(connection->IsPending());
189 uint32_t remote_id = connection->GetRemoteInstanceID(); 189 uint32_t remote_id = connection->GetRemoteInstanceID();
190 EXPECT_NE(mojom::kInvalidInstanceID, remote_id); 190 EXPECT_NE(mojom::kInvalidInstanceID, remote_id);
191 191
192 // 3. Validate that this test suite's name was received from the application 192 // 3. Validate that this test suite's name was received from the application
193 // manager. 193 // manager.
194 EXPECT_TRUE(ContainsInstanceWithName("mojo:shell_unittest")); 194 EXPECT_TRUE(ContainsInstanceWithName("mojo:shell_unittest"));
195 195
196 // 4. Validate that the right applications/processes were created. 196 // 4. Validate that the right applications/processes were created.
(...skipping 11 matching lines...) Expand all
208 // We learn about the target process id via a ping from it. 208 // We learn about the target process id via a ping from it.
209 EXPECT_EQ(target_id(), instance.id); 209 EXPECT_EQ(target_id(), instance.id);
210 EXPECT_EQ("exe:shell_unittest_target", instance.name); 210 EXPECT_EQ("exe:shell_unittest_target", instance.name);
211 EXPECT_NE(base::kNullProcessId, instance.pid); 211 EXPECT_NE(base::kNullProcessId, instance.pid);
212 } 212 }
213 213
214 driver.set_connection_error_handler( 214 driver.set_connection_error_handler(
215 base::Bind(&ShellTest::OnDriverQuit, 215 base::Bind(&ShellTest::OnDriverQuit,
216 base::Unretained(this))); 216 base::Unretained(this)));
217 driver->QuitDriver(); 217 driver->QuitDriver();
218 base::MessageLoop::current()->Run(); 218 base::RunLoop().Run();
219 } 219 }
220 220
221 } // namespace shell 221 } // namespace shell
OLDNEW
« no previous file with comments | « remoting/test/protocol_perftest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698