Remove BAD_NATIVE error checks from negative EGL tests.
authorMika Isojärvi <misojarvi@google.com>
Mon, 16 Mar 2015 23:12:14 +0000 (16:12 -0700)
committerMika Isojärvi <misojarvi@google.com>
Wed, 18 Mar 2015 21:34:58 +0000 (14:34 -0700)
EGL specification doesn't guarantee that passing invalid native values would
generate errors. Instead behaviour is unspecified and can lead to crashes.

Bug: 19695619
Change-Id: I9002931d39b0c60d6f81b2e1f494f9390a19cf8a

modules/egl/teglNegativeApiTests.cpp

index 3961eaa..d66cf20 100755 (executable)
@@ -634,9 +634,6 @@ void NegativeApiTests::init (void)
                        {
                                expectNoSurface(eglCreatePixmapSurface(display, pixmapConfig, DE_NULL, s_emptyAttribList));
                                expectError(EGL_BAD_NATIVE_PIXMAP);
-
-                               expectNoSurface(eglCreatePixmapSurface(display, pixmapConfig, (EGLNativePixmapType)-1, s_emptyAttribList));
-                               expectError(EGL_BAD_NATIVE_PIXMAP);
                        }
 
                        log << TestLog::EndSection;
@@ -672,9 +669,6 @@ void NegativeApiTests::init (void)
                        {
                                expectNoSurface(eglCreateWindowSurface(display, windowConfig, DE_NULL, s_emptyAttribList));
                                expectError(EGL_BAD_NATIVE_WINDOW);
-
-                               expectNoSurface(eglCreateWindowSurface(display, windowConfig, (EGLNativeWindowType)-1, s_emptyAttribList));
-                               expectError(EGL_BAD_NATIVE_WINDOW);
                        }
 
                        log << TestLog::EndSection;