Commit 9e7db227 by Corentin Wallez

Revert "Revert "Make EGLQueryContextTest use ANGLE_INSTANTIATE_TEST""

The original commit was not the one causing the problem it was reverted for. This reverts commit c4738880. BUG=angleproject:892 Change-Id: I8dee28545c3895750247635a63b73ecec4ba449c Reviewed-on: https://chromium-review.googlesource.com/270262Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/270473Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 47fc1fec
...@@ -49,14 +49,13 @@ ...@@ -49,14 +49,13 @@
'<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp', '<(angle_path)/src/tests/gl_tests/UnpackRowLength.cpp',
'<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp', '<(angle_path)/src/tests/gl_tests/VertexAttributeTest.cpp',
'<(angle_path)/src/tests/gl_tests/ViewportTest.cpp', '<(angle_path)/src/tests/gl_tests/ViewportTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
'<(angle_path)/src/tests/end2end_tests/ANGLETest.cpp', '<(angle_path)/src/tests/end2end_tests/ANGLETest.cpp',
'<(angle_path)/src/tests/end2end_tests/ANGLETest.h', '<(angle_path)/src/tests/end2end_tests/ANGLETest.h',
'<(angle_path)/src/tests/test_utils/angle_test_configs.h', '<(angle_path)/src/tests/test_utils/angle_test_configs.h',
], ],
'angle_end2end_tests_win_sources': 'angle_end2end_tests_win_sources':
[ [
# TODO(cwallez) for Linux, requires only trying the OpenGL ANGLE platform
'<(angle_path)/src/tests/egl_tests/EGLQueryContextTest.cpp',
# TODO(cwallez) for Linux, requires a portable implementation of sleep # TODO(cwallez) for Linux, requires a portable implementation of sleep
'<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp', '<(angle_path)/src/tests/gl_tests/OcclusionQueriesTest.cpp',
# TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers # TODO(cwallez) for Linux, requires implementation of eglBindTexImage for pbuffers
......
...@@ -9,19 +9,23 @@ ...@@ -9,19 +9,23 @@
#include <EGL/egl.h> #include <EGL/egl.h>
#include <EGL/eglext.h> #include <EGL/eglext.h>
class EGLQueryContextTest : public testing::TestWithParam<int> #include "test_utils/angle_test_configs.h"
using namespace angle;
class EGLQueryContextTest : public testing::TestWithParam<PlatformParameters>
{ {
public: public:
void SetUp() override void SetUp() override
{ {
int clientVersion = GetParam(); int clientVersion = GetParam().mClientVersion;
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT")); PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL); EXPECT_TRUE(eglGetPlatformDisplayEXT != NULL);
EGLint dispattrs[] = EGLint dispattrs[] =
{ {
EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_PLATFORM_ANGLE_TYPE_ANGLE, GetParam().mEGLPlatformParameters.renderer,
EGL_NONE EGL_NONE
}; };
mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, dispattrs); mDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, dispattrs);
...@@ -92,7 +96,7 @@ TEST_P(EGLQueryContextTest, GetClientVersion) ...@@ -92,7 +96,7 @@ TEST_P(EGLQueryContextTest, GetClientVersion)
{ {
EGLint clientVersion; EGLint clientVersion;
EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE); EXPECT_TRUE(eglQueryContext(mDisplay, mContext, EGL_CONTEXT_CLIENT_VERSION, &clientVersion) != EGL_FALSE);
EXPECT_TRUE(clientVersion == GetParam()); EXPECT_TRUE(clientVersion == GetParam().mClientVersion);
} }
TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface) TEST_P(EGLQueryContextTest, GetRenderBufferNoSurface)
...@@ -144,4 +148,5 @@ TEST_P(EGLQueryContextTest, BadAttribute) ...@@ -144,4 +148,5 @@ TEST_P(EGLQueryContextTest, BadAttribute)
EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE); EXPECT_TRUE(eglGetError() == EGL_BAD_ATTRIBUTE);
} }
INSTANTIATE_TEST_CASE_P(, EGLQueryContextTest, testing::Values(2, 3)); ANGLE_INSTANTIATE_TEST(EGLQueryContextTest, ES2_D3D9(), ES2_D3D11(), ES2_D3D11_FL9_3(), ES2_OPENGL(),
ES3_D3D11(), ES3_OPENGL());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment