OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ | 5 #ifndef O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ |
6 #define O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ | 6 #define O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ |
7 | 7 |
8 #include "o3d/gpu_plugin/np_utils/np_browser_stub.h" | 8 #include "o3d/gpu_plugin/np_utils/np_browser_stub.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 MockNPBrowser() { | 24 MockNPBrowser() { |
25 // Do not mock CreateObject by default but allow it to be mocked so object | 25 // Do not mock CreateObject by default but allow it to be mocked so object |
26 // creation can be intercepted. | 26 // creation can be intercepted. |
27 ON_CALL(*this, CreateObject(testing::_, testing::_)) | 27 ON_CALL(*this, CreateObject(testing::_, testing::_)) |
28 .WillByDefault(testing::Invoke(this, | 28 .WillByDefault(testing::Invoke(this, |
29 &MockNPBrowser::ConcreteCreateObject)); | 29 &MockNPBrowser::ConcreteCreateObject)); |
30 } | 30 } |
31 | 31 |
32 MOCK_METHOD2(CreateObject, NPObject*(NPP, const NPClass*)); | 32 MOCK_METHOD2(CreateObject, NPObject*(NPP, const NPClass*)); |
33 MOCK_METHOD1(GetWindowNPObject, NPObject*(NPP)); | 33 MOCK_METHOD1(GetWindowNPObject, NPObject*(NPP)); |
34 MOCK_METHOD4(MapSharedMemory, NPSharedMemory*(NPP, NPObject*, size_t, bool)); | |
35 MOCK_METHOD2(UnmapSharedMemory, void(NPP, NPSharedMemory*)); | |
36 }; | 34 }; |
37 | 35 |
38 } // namespace gpu_plugin | 36 } // namespace gpu_plugin |
39 } // namespace o3d | 37 } // namespace o3d |
40 | 38 |
41 #endif // O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ | 39 #endif // O3D_GPU_PLUGIN_NP_UTILS_NP_BROWSER_MOCK_H_ |
OLD | NEW |