OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "mojo/shell/package_test.mojom.h" | 13 #include "mojo/shell/package_test.mojom.h" |
14 #include "mojo/shell/public/cpp/application_test_base.h" | 14 #include "mojo/shell/public/cpp/application_test_base.h" |
15 #include "mojo/shell/public/interfaces/application_manager.mojom.h" | 15 #include "mojo/shell/public/interfaces/application_manager.mojom.h" |
16 | 16 |
17 // Tests that multiple applications can be packaged in a single Mojo application | 17 // Tests that multiple applications can be packaged in a single Mojo application |
18 // implementing ContentHandler; that these applications can be specified by | 18 // implementing ShellClientFactory; that these applications can be specified by |
19 // the package's manifest and are thus registered with the PackageManager. | 19 // the package's manifest and are thus registered with the PackageManager. |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 namespace shell { | 22 namespace shell { |
23 namespace { | 23 namespace { |
24 void ReceiveName(std::string* out_name, | 24 void ReceiveName(std::string* out_name, |
25 base::RunLoop* loop, | 25 base::RunLoop* loop, |
26 const String& name) { | 26 const String& name) { |
27 *out_name = name; | 27 *out_name = name; |
28 loop->Quit(); | 28 loop->Quit(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 run_loop.Run(); | 75 run_loop.Run(); |
76 EXPECT_EQ("B", b_name); | 76 EXPECT_EQ("B", b_name); |
77 uint32_t id = mojom::Shell::kInvalidApplicationID; | 77 uint32_t id = mojom::Shell::kInvalidApplicationID; |
78 EXPECT_TRUE(connection->GetRemoteApplicationID(&id)); | 78 EXPECT_TRUE(connection->GetRemoteApplicationID(&id)); |
79 ids.insert(id); | 79 ids.insert(id); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 } // namespace shell | 83 } // namespace shell |
84 } // namespace mojo | 84 } // namespace mojo |
OLD | NEW |