OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Functions and constants for test registration and setup. | 5 // Functions and constants for test registration and setup. |
6 // | 6 // |
7 // NOTE: These must be implemented by the tester: | 7 // NOTE: These must be implemented by the tester: |
8 // - SetupTests() | 8 // - SetupTests() |
9 // - SetupPluginInterfaces() | 9 // - SetupPluginInterfaces() |
10 // | 10 // |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // set at initialization/creation. | 176 // set at initialization/creation. |
177 PP_Instance pp_instance(); | 177 PP_Instance pp_instance(); |
178 PP_Module pp_module(); | 178 PP_Module pp_module(); |
179 | 179 |
180 // If you are providing your own version of PPP_Instance::DidCreate | 180 // If you are providing your own version of PPP_Instance::DidCreate |
181 // call this function to ensure proper test set-up. | 181 // call this function to ensure proper test set-up. |
182 PP_Bool DidCreateDefault(PP_Instance instance, | 182 PP_Bool DidCreateDefault(PP_Instance instance, |
183 uint32_t argc, const char* argn[], const char* argv[]); | 183 uint32_t argc, const char* argn[], const char* argv[]); |
184 // Other default implementations of the required PPP_Instance functions. | 184 // Other default implementations of the required PPP_Instance functions. |
185 void DidDestroyDefault(PP_Instance instance); | 185 void DidDestroyDefault(PP_Instance instance); |
186 void DidChangeViewDefault(PP_Instance instance, | 186 void DidChangeViewDefault(PP_Instance instance, PP_Resource view); |
187 const struct PP_Rect* position, | |
188 const struct PP_Rect* clip); | |
189 void DidChangeFocusDefault(PP_Instance instance, PP_Bool has_focus); | 187 void DidChangeFocusDefault(PP_Instance instance, PP_Bool has_focus); |
190 PP_Bool HandleDocumentLoadDefault(PP_Instance instance, PP_Resource url_loader); | 188 PP_Bool HandleDocumentLoadDefault(PP_Instance instance, PP_Resource url_loader); |
191 | 189 |
192 | 190 |
193 bool IsSizeInRange(PP_Size size, PP_Size min_size, PP_Size max_size); | 191 bool IsSizeInRange(PP_Size size, PP_Size min_size, PP_Size max_size); |
194 bool IsSizeEqual(PP_Size size, PP_Size expected); | 192 bool IsSizeEqual(PP_Size size, PP_Size expected); |
195 bool IsRectEqual(PP_Rect position, PP_Rect expected); | 193 bool IsRectEqual(PP_Rect position, PP_Rect expected); |
196 | 194 |
197 // TODO(polina, nfullagar): allow specification of non-premultipled colors | 195 // TODO(polina, nfullagar): allow specification of non-premultipled colors |
198 // and provide alpha premultiplcation in FormatColor(). This will be required | 196 // and provide alpha premultiplcation in FormatColor(). This will be required |
(...skipping 18 matching lines...) Expand all Loading... |
217 PP_Resource CreateImageData(PP_Size size, ColorPremul pixel_color, void** bmp); | 215 PP_Resource CreateImageData(PP_Size size, ColorPremul pixel_color, void** bmp); |
218 | 216 |
219 | 217 |
220 // Checks if the image rect of |color| and |size| is on the screen at |origin|. | 218 // Checks if the image rect of |color| and |size| is on the screen at |origin|. |
221 bool IsImageRectOnScreen(PP_Resource graphics2d, | 219 bool IsImageRectOnScreen(PP_Resource graphics2d, |
222 PP_Point origin, | 220 PP_Point origin, |
223 PP_Size size, | 221 PP_Size size, |
224 ColorPremul color); | 222 ColorPremul color); |
225 | 223 |
226 #endif // NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_TEST_INTERFACE_H | 224 #endif // NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_TEST_INTERFACE_H |
OLD | NEW |