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

Side by Side Diff: mojo/application/application_test_base_chromium.h

Issue 1142323003: Remove duplicate application cpp files in mojo/application. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 2014 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 #ifndef MOJO_APPLICATION_APPLICATION_TEST_BASE_CHROMIUM_H_
6 #define MOJO_APPLICATION_APPLICATION_TEST_BASE_CHROMIUM_H_
7
8 #include "mojo/application/public/cpp/application_delegate.h"
9 #include "mojo/application/public/interfaces/application.mojom.h"
10 #include "mojo/public/cpp/bindings/array.h"
11 #include "mojo/public/cpp/bindings/string.h"
12 #include "mojo/public/cpp/system/macros.h"
13 #include "testing/gtest/include/gtest/gtest.h"
14
15 namespace mojo {
16
17 class ApplicationImpl;
18
19 namespace test {
20
21 // Run all application tests. This must be called after the environment is
22 // initialized, to support construction of a default run loop.
23 MojoResult RunAllTests(MojoHandle application_request_handle);
24
25 // A GTEST base class for application testing executed in mojo_shell.
26 class ApplicationTestBase : public testing::Test {
27 public:
28 ApplicationTestBase();
29 ~ApplicationTestBase() override;
30
31 protected:
32 ApplicationImpl* application_impl() { return application_impl_; }
33
34 // Get the ApplicationDelegate for the application to be tested.
35 virtual ApplicationDelegate* GetApplicationDelegate();
36
37 // testing::Test:
38 void SetUp() override;
39 void TearDown() override;
40
41 // True by default, which indicates a MessageLoop will automatically be
42 // created for the application. Tests may override this function to prevent
43 // a default loop from being created.
44 virtual bool ShouldCreateDefaultRunLoop();
45
46 private:
47 // The application implementation instance, reconstructed for each test.
48 ApplicationImpl* application_impl_;
49 // The application delegate used if GetApplicationDelegate is not overridden.
50 ApplicationDelegate default_application_delegate_;
51
52 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase);
53 };
54
55 } // namespace test
56
57 } // namespace mojo
58
59 #endif // MOJO_APPLICATION_APPLICATION_TEST_BASE_CHROMIUM_H_
OLDNEW
« no previous file with comments | « mojo/application/application_runner_chromium.cc ('k') | mojo/application/application_test_base_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698