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

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

Issue 683583002: Update mojo sdk to rev e083961bf11fd0c94d40be8853761da529b6d444 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
6 #define MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
7
8 #include "mojo/public/cpp/bindings/array.h"
9 #include "mojo/public/cpp/bindings/string.h"
10 #include "mojo/public/cpp/system/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace mojo {
14
15 class ApplicationDelegate;
16 class ApplicationImpl;
17
18 namespace test {
19
20 // A GTEST base class for application testing executed in mojo_shell.
21 class ApplicationTestBase : public testing::Test {
22 public:
23 explicit ApplicationTestBase(Array<String> args);
24 ~ApplicationTestBase() override;
25
26 protected:
27 ApplicationImpl* application_impl() { return application_impl_; }
28
29 // Get the ApplicationDelegate for the application to be tested.
30 virtual ApplicationDelegate* GetApplicationDelegate() = 0;
31
32 // testing::Test:
33 void SetUp() override;
34 void TearDown() override;
35
36 private:
37 // The command line arguments supplied to each test application instance.
38 Array<String> args_;
39
40 // The application implementation instance, reconstructed for each test.
41 ApplicationImpl* application_impl_;
42
43 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase);
44 };
45
46 } // namespace test
47
48 } // namespace mojo
49
50 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698