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

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

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 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
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/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/bindings/array.h" 9 #include "mojo/public/cpp/bindings/array.h"
10 #include "mojo/public/cpp/bindings/string.h" 10 #include "mojo/public/cpp/bindings/string.h"
11 #include "mojo/public/cpp/system/macros.h" 11 #include "mojo/public/cpp/system/macros.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
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
24 // Access the command line arguments passed to the application test. 20 // Access the command line arguments passed to the application test.
25 const Array<String>& Args(); 21 const Array<String>& Args();
26 void InitializeArgs(int argc, std::vector<const char*> argv); 22
23 // Run all application tests. This must be called after the environment is
24 // initialized, to support construction of a default run loop.
25 MojoResult RunAllTests(MojoHandle shell_handle);
27 26
28 // A GTEST base class for application testing executed in mojo_shell. 27 // A GTEST base class for application testing executed in mojo_shell.
29 class ApplicationTestBase : public testing::Test { 28 class ApplicationTestBase : public testing::Test {
30 public: 29 public:
31 ApplicationTestBase(); 30 ApplicationTestBase();
32 ~ApplicationTestBase() override; 31 ~ApplicationTestBase() override;
33 32
34 protected: 33 protected:
35 ApplicationImpl* application_impl() { return application_impl_; } 34 ApplicationImpl* application_impl() { return application_impl_; }
36 35
(...skipping 20 matching lines...) Expand all
57 ApplicationDelegate default_application_delegate_; 56 ApplicationDelegate default_application_delegate_;
58 57
59 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase); 58 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationTestBase);
60 }; 59 };
61 60
62 } // namespace test 61 } // namespace test
63 62
64 } // namespace mojo 63 } // namespace mojo
65 64
66 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_ 65 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_TEST_BASE_H_
OLDNEW
« no previous file with comments | « mojo/public/c/test_support/BUILD.gn ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698