OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 LIBRARIES_NACL_IO_TEST_MOCK_UTIL_H_ | 5 #ifndef TESTS_NACL_IO_TEST_MOCK_UTIL_H_ |
6 #define LIBRARIES_NACL_IO_TEST_MOCK_UTIL_H_ | 6 #define TESTS_NACL_IO_TEST_MOCK_UTIL_H_ |
7 | 7 |
8 #include <gmock/gmock.h> | 8 #include <gmock/gmock.h> |
9 #include <ppapi/c/pp_completion_callback.h> | 9 #include <ppapi/c/pp_completion_callback.h> |
10 #include <ppapi/c/pp_var.h> | 10 #include <ppapi/c/pp_var.h> |
11 | 11 |
12 ACTION_TEMPLATE(CallCallback, | 12 ACTION_TEMPLATE(CallCallback, |
13 HAS_1_TEMPLATE_PARAMS(int, k), | 13 HAS_1_TEMPLATE_PARAMS(int, k), |
14 AND_1_VALUE_PARAMS(result)) { | 14 AND_1_VALUE_PARAMS(result)) { |
15 PP_CompletionCallback callback = std::tr1::get<k>(args); | 15 PP_CompletionCallback callback = std::tr1::get<k>(args); |
16 if (callback.func) { | 16 if (callback.func) { |
(...skipping 25 matching lines...) Expand all Loading... |
42 case PP_VARTYPE_ARRAY: | 42 case PP_VARTYPE_ARRAY: |
43 case PP_VARTYPE_ARRAY_BUFFER: | 43 case PP_VARTYPE_ARRAY_BUFFER: |
44 case PP_VARTYPE_DICTIONARY: | 44 case PP_VARTYPE_DICTIONARY: |
45 case PP_VARTYPE_OBJECT: | 45 case PP_VARTYPE_OBJECT: |
46 default: | 46 default: |
47 // Not supported. | 47 // Not supported. |
48 return false; | 48 return false; |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 #endif // LIBRARIES_NACL_IO_TEST_MOCK_UTIL_H_ | 52 #endif // TESTS_NACL_IO_TEST_MOCK_UTIL_H_ |
OLD | NEW |