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

Side by Side Diff: ash/mus/app_launch_unittest.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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 | « ash/mus/accessibility_delegate_mus.cc ('k') | ash/mus/keyboard_ui_mus.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "mash/quick_launch/public/interfaces/constants.mojom.h" 8 #include "mash/quick_launch/public/interfaces/constants.mojom.h"
9 #include "services/service_manager/public/cpp/service_test.h" 9 #include "services/service_manager/public/cpp/service_test.h"
10 #include "services/ui/public/interfaces/constants.mojom.h" 10 #include "services/ui/public/interfaces/constants.mojom.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest); 32 DISALLOW_COPY_AND_ASSIGN(AppLaunchTest);
33 }; 33 };
34 34
35 TEST_F(AppLaunchTest, TestQuickLaunch) { 35 TEST_F(AppLaunchTest, TestQuickLaunch) {
36 connector()->Connect("ash"); 36 connector()->Connect("ash");
37 connector()->Connect(mash::quick_launch::mojom::kServiceName); 37 connector()->Connect(mash::quick_launch::mojom::kServiceName);
38 38
39 ui::mojom::WindowServerTestPtr test_interface; 39 ui::mojom::WindowServerTestPtr test_interface;
40 connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); 40 connector()->BindInterface(ui::mojom::kServiceName, &test_interface);
41 41
42 base::RunLoop run_loop; 42 base::RunLoop run_loop;
43 bool success = false; 43 bool success = false;
44 test_interface->EnsureClientHasDrawnWindow( 44 test_interface->EnsureClientHasDrawnWindow(
45 mash::quick_launch::mojom::kServiceName, 45 mash::quick_launch::mojom::kServiceName,
46 base::Bind(&RunCallback, &success, run_loop.QuitClosure())); 46 base::Bind(&RunCallback, &success, run_loop.QuitClosure()));
47 run_loop.Run(); 47 run_loop.Run();
48 EXPECT_TRUE(success); 48 EXPECT_TRUE(success);
49 } 49 }
50 50
51 } // namespace mus 51 } // namespace mus
52 } // namespace ash 52 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/accessibility_delegate_mus.cc ('k') | ash/mus/keyboard_ui_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698