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 #ifndef PPAPI_TESTS_TEST_GRAPHICS_2D_H_ | 5 #ifndef PPAPI_TESTS_TEST_GRAPHICS_2D_H_ |
6 #define PPAPI_TESTS_TEST_GRAPHICS_2D_H_ | 6 #define PPAPI_TESTS_TEST_GRAPHICS_2D_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
11 #include "ppapi/tests/test_case.h" | 11 #include "ppapi/tests/test_case.h" |
12 | 12 |
13 struct PPB_Graphics2D; | 13 struct PPB_Graphics2D; |
14 struct PPB_ImageData; | 14 struct PPB_ImageData; |
15 | 15 |
16 namespace pp { | 16 namespace pp { |
17 class Graphics2D; | 17 class Graphics2D; |
18 class ImageData; | 18 class ImageData; |
19 class Point; | 19 class Point; |
20 class Rect; | 20 class Rect; |
21 } | 21 } |
22 | 22 |
23 class TestGraphics2D : public TestCase { | 23 class TestGraphics2D : public TestCase { |
24 public: | 24 public: |
25 explicit TestGraphics2D(TestingInstance* instance) : TestCase(instance) {} | 25 explicit TestGraphics2D(TestingInstance* instance) : TestCase(instance) {} |
26 | 26 |
27 // TestCase implementation. | 27 // TestCase implementation. |
28 virtual bool Init(); | 28 virtual bool Init(); |
29 virtual void RunTest(); | 29 virtual void RunTests(const std::string& filter); |
30 | 30 |
31 void QuitMessageLoop(); | 31 void QuitMessageLoop(); |
32 | 32 |
33 private: | 33 private: |
34 bool ReadImageData(const pp::Graphics2D& dc, | 34 bool ReadImageData(const pp::Graphics2D& dc, |
35 pp::ImageData* image, | 35 pp::ImageData* image, |
36 const pp::Point& top_left) const; | 36 const pp::Point& top_left) const; |
37 | 37 |
38 void FillRectInImage(pp::ImageData* image, | 38 void FillRectInImage(pp::ImageData* image, |
39 const pp::Rect& rect, | 39 const pp::Rect& rect, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 std::string TestScroll(); | 79 std::string TestScroll(); |
80 std::string TestReplace(); | 80 std::string TestReplace(); |
81 std::string TestFlush(); | 81 std::string TestFlush(); |
82 | 82 |
83 // Used by the tests that access the C API directly. | 83 // Used by the tests that access the C API directly. |
84 const PPB_Graphics2D* graphics_2d_interface_; | 84 const PPB_Graphics2D* graphics_2d_interface_; |
85 const PPB_ImageData* image_data_interface_; | 85 const PPB_ImageData* image_data_interface_; |
86 }; | 86 }; |
87 | 87 |
88 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_ | 88 #endif // PPAPI_TESTS_TEST_GRAPHICS_2D_H_ |
OLD | NEW |