OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "c_salt/test/gtest_instance.h" | 4 #include "gtest_ppapi/gtest_instance.h" |
5 #include "ppapi/cpp/module.h" | 5 #include "ppapi/cpp/module.h" |
6 | 6 |
7 namespace c_salt { | |
8 | |
9 // GTestModule is a NaCl module dedicated to running gtest-based unit tests. | 7 // GTestModule is a NaCl module dedicated to running gtest-based unit tests. |
10 // It creates an NaCl instance based on GTestInstance. | 8 // It creates an NaCl instance based on GTestInstance. |
11 class GTestModule : public pp::Module { | 9 class GTestModule : public pp::Module { |
12 public: | 10 public: |
13 GTestModule() : pp::Module() {} | 11 GTestModule() : pp::Module() {} |
14 ~GTestModule() {} | 12 ~GTestModule() {} |
15 | 13 |
16 virtual pp::Instance* CreateInstance(PP_Instance instance) { | 14 virtual pp::Instance* CreateInstance(PP_Instance instance) { |
17 return new c_salt::GTestInstance(instance); | 15 return new GTestInstance(instance); |
18 } | 16 } |
19 }; | 17 }; |
20 | 18 |
21 } // namespace c_salt | 19 namespace pp { |
22 | 20 |
23 namespace pp { | |
24 Module* CreateModule() { | 21 Module* CreateModule() { |
25 return new c_salt::GTestModule(); | 22 return new GTestModule(); |
26 } | 23 } |
| 24 |
27 } // namespace pp | 25 } // namespace pp |
28 | |
OLD | NEW |