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

Side by Side Diff: mojo/public/cpp/application/application_test_base.h

Issue 680263004: Split application_test_main.cc out of *_base.cc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync and rebase. Created 6 years, 1 month 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 | « mojo/public/cpp/application/BUILD.gn ('k') | mojo/public/cpp/application/lib/DEPS » ('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 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 #ifndef MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_ 5 #ifndef MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
6 #define MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_ 6 #define MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
7 7
8 #include "mojo/public/cpp/bindings/array.h" 8 #include "mojo/public/cpp/bindings/array.h"
9 #include "mojo/public/cpp/bindings/string.h" 9 #include "mojo/public/cpp/bindings/string.h"
10 #include "mojo/public/cpp/system/macros.h" 10 #include "mojo/public/cpp/system/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 14
15 class ApplicationDelegate; 15 class ApplicationDelegate;
16 class ApplicationImpl; 16 class ApplicationImpl;
17 17
18 namespace test { 18 namespace test {
19 19
20 // Access the shell handle shared by multiple test application instances.
21 ScopedMessagePipeHandle PassShellHandle();
22 void SetShellHandle(ScopedMessagePipeHandle handle);
23
20 // A GTEST base class for application testing executed in mojo_shell. 24 // A GTEST base class for application testing executed in mojo_shell.
21 class ApplicationTestBase : public testing::Test { 25 class ApplicationTestBase : public testing::Test {
22 public: 26 public:
23 explicit ApplicationTestBase(Array<String> args); 27 explicit ApplicationTestBase(Array<String> args);
24 ~ApplicationTestBase() override; 28 ~ApplicationTestBase() override;
25 29
26 protected: 30 protected:
27 ApplicationImpl* application_impl() { return application_impl_; } 31 ApplicationImpl* application_impl() { return application_impl_; }
28 32
29 // Get the ApplicationDelegate for the application to be tested. 33 // Get the ApplicationDelegate for the application to be tested.
(...skipping 11 matching lines...) Expand all
41 ApplicationImpl* application_impl_; 45 ApplicationImpl* application_impl_;
42 46
43 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase); 47 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase);
44 }; 48 };
45 49
46 } // namespace test 50 } // namespace test
47 51
48 } // namespace mojo 52 } // namespace mojo
49 53
50 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_ 54 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/BUILD.gn ('k') | mojo/public/cpp/application/lib/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698