| 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 PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |   5 #ifndef PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 
|   6 #define PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |   6 #define PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 
|   7  |   7  | 
 |   8 #include <string> | 
|   8 #include "ppapi/tests/test_case.h" |   9 #include "ppapi/tests/test_case.h" | 
|   9  |  10  | 
|  10 struct PPB_Graphics3D_Dev; |  11 struct PPB_Graphics3D_Dev; | 
|  11 struct PPB_OpenGLES2_Dev; |  12 struct PPB_OpenGLES2_Dev; | 
|  12  |  13  | 
 |  14 namespace pp { | 
 |  15 class Graphics3D_Dev; | 
 |  16 }  // namespace pp | 
 |  17  | 
|  13 class TestGraphics3D : public TestCase { |  18 class TestGraphics3D : public TestCase { | 
|  14  public: |  19  public: | 
|  15   TestGraphics3D(TestingInstance* instance) : TestCase(instance) {} |  20   TestGraphics3D(TestingInstance* instance) : TestCase(instance) {} | 
|  16  |  21  | 
|  17   // TestCase implementation. |  22   // TestCase implementation. | 
|  18   virtual bool Init(); |  23   virtual bool Init(); | 
|  19   virtual void RunTest(); |  24   virtual void RunTest(); | 
|  20  |  25  | 
|  21  private: |  26  private: | 
 |  27   // Various tests. | 
 |  28   std::string TestFrame(); | 
 |  29  | 
 |  30   // Utils used by various tests. | 
 |  31   int32_t SwapBuffersSync(pp::Graphics3D_Dev* context); | 
 |  32   std::string TestPixel(pp::Graphics3D_Dev* context, | 
 |  33                         int x, int y, const uint8_t expected_color[4]); | 
 |  34  | 
|  22   // Used by the tests that access the C API directly. |  35   // Used by the tests that access the C API directly. | 
|  23   const PPB_Graphics3D_Dev* graphics_3d_; |  36   const PPB_Graphics3D_Dev* graphics_3d_; | 
|  24   const PPB_OpenGLES2_Dev* opengl_es2_; |  37   const PPB_OpenGLES2_Dev* opengl_es2_; | 
|  25 }; |  38 }; | 
|  26  |  39  | 
|  27 #endif  // PAPPI_TESTS_TEST_GRAPHICS_3D_H_ |  40 #endif  // PAPPI_TESTS_TEST_GRAPHICS_3D_H_ | 
| OLD | NEW |