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

Side by Side Diff: mojo/shell/application_manager_apptest_target.cc

Issue 1706833003: Move various Shell tests into a subdir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@conn
Patch Set: . Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/macros.h"
8 #include "mojo/shell/application_manager_apptests.mojom.h"
9 #include "mojo/shell/public/cpp/connection.h"
10 #include "mojo/shell/public/cpp/shell.h"
11 #include "mojo/shell/public/cpp/shell_client.h"
12 #include "mojo/shell/runner/child/test_native_main.h"
13 #include "mojo/shell/runner/init.h"
14
15 using mojo::shell::test::mojom::CreateInstanceForHandleTestPtr;
16
17 namespace {
18
19 class TargetApplicationDelegate : public mojo::ShellClient {
20 public:
21 TargetApplicationDelegate() {}
22 ~TargetApplicationDelegate() override {}
23
24 private:
25 // mojo::ShellClient:
26 void Initialize(mojo::Shell* shell, const std::string& url,
27 uint32_t id) override {
28 CreateInstanceForHandleTestPtr service;
29 shell->ConnectToInterface("mojo:mojo_shell_apptests", &service);
30 service->SetTargetID(id);
31 }
32
33 DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate);
34 };
35
36 } // namespace
37
38 int main(int argc, char** argv) {
39 base::AtExitManager at_exit;
40 base::CommandLine::Init(argc, argv);
41
42 mojo::shell::InitializeLogging();
43
44 TargetApplicationDelegate delegate;
45 return mojo::shell::TestNativeMain(&delegate);
46 }
OLDNEW
« no previous file with comments | « mojo/shell/application_manager_apptest_manifest.json ('k') | mojo/shell/application_manager_apptests.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698