Skip DXT1CompressedTextureTestES3.PBOCompressedTexImage when DXT1 not supported

Was failing on Nexus 5X Adreno,
which doesn't have GL_EXT_texture_compression_dxt1 extension.
Also rename the tests to indicate they test DXT1 compression format.

BUG=angleproject:1424
TEST=DXT1CompressedTextureTestES3.PBOCompressedTexImage

Change-Id: Ic82363a6f497da12602f3f3a662a52ffa833aa0f
Reviewed-on: https://chromium-review.googlesource.com/355711
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/tests/angle_end2end_tests.gypi b/src/tests/angle_end2end_tests.gypi
index a5be4bc..d0b8634 100644
--- a/src/tests/angle_end2end_tests.gypi
+++ b/src/tests/angle_end2end_tests.gypi
@@ -22,7 +22,6 @@
             '<(angle_path)/src/tests/gl_tests/BuiltinVariableTest.cpp',
             '<(angle_path)/src/tests/gl_tests/ClearTest.cpp',
             '<(angle_path)/src/tests/gl_tests/ColorMaskTest.cpp',
-            '<(angle_path)/src/tests/gl_tests/CompressedTextureTest.cpp',
             '<(angle_path)/src/tests/gl_tests/CopyTexImageTest.cpp',
             '<(angle_path)/src/tests/gl_tests/CubeMapTextureTest.cpp',
             '<(angle_path)/src/tests/gl_tests/DebugMarkerTest.cpp',
@@ -31,6 +30,7 @@
             '<(angle_path)/src/tests/gl_tests/DiscardFramebufferEXTTest.cpp',
             '<(angle_path)/src/tests/gl_tests/DrawBuffersTest.cpp',
             '<(angle_path)/src/tests/gl_tests/DrawElementsTest.cpp',
+            '<(angle_path)/src/tests/gl_tests/DXT1CompressedTextureTest.cpp',
             '<(angle_path)/src/tests/gl_tests/ETCTextureTest.cpp',
             '<(angle_path)/src/tests/gl_tests/FenceSyncTests.cpp',
             '<(angle_path)/src/tests/gl_tests/FramebufferMixedSamplesTest.cpp',
diff --git a/src/tests/gl_tests/CompressedTextureTest.cpp b/src/tests/gl_tests/DXT1CompressedTextureTest.cpp
similarity index 93%
rename from src/tests/gl_tests/CompressedTextureTest.cpp
rename to src/tests/gl_tests/DXT1CompressedTextureTest.cpp
index 5b1fb4f..c675615 100644
--- a/src/tests/gl_tests/CompressedTextureTest.cpp
+++ b/src/tests/gl_tests/DXT1CompressedTextureTest.cpp
@@ -10,10 +10,10 @@
 
 using namespace angle;
 
-class CompressedTextureTest : public ANGLETest
+class DXT1CompressedTextureTest : public ANGLETest
 {
   protected:
-    CompressedTextureTest()
+    DXT1CompressedTextureTest()
     {
         setWindowWidth(512);
         setWindowHeight(512);
@@ -75,7 +75,7 @@
     GLint mTextureUniformLocation;
 };
 
-TEST_P(CompressedTextureTest, CompressedTexImage)
+TEST_P(DXT1CompressedTextureTest, CompressedTexImage)
 {
     if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
     {
@@ -116,7 +116,7 @@
     EXPECT_GL_NO_ERROR();
 }
 
-TEST_P(CompressedTextureTest, CompressedTexStorage)
+TEST_P(DXT1CompressedTextureTest, CompressedTexStorage)
 {
     if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
     {
@@ -173,12 +173,19 @@
     EXPECT_GL_NO_ERROR();
 }
 
-class CompressedTextureTestES3 : public CompressedTextureTest { };
+class DXT1CompressedTextureTestES3 : public DXT1CompressedTextureTest { };
 
-class CompressedTextureTestD3D11 : public CompressedTextureTest { };
+class DXT1CompressedTextureTestD3D11 : public DXT1CompressedTextureTest { };
 
-TEST_P(CompressedTextureTestES3, PBOCompressedTexImage)
+TEST_P(DXT1CompressedTextureTestES3, PBOCompressedTexImage)
 {
+    if (!extensionEnabled("GL_EXT_texture_compression_dxt1"))
+    {
+        std::cout << "Test skipped because GL_EXT_texture_compression_dxt1 is not available."
+                  << std::endl;
+        return;
+    }
+
     GLuint texture;
     glGenTextures(1, &texture);
     glBindTexture(GL_TEXTURE_2D, texture);
@@ -230,7 +237,7 @@
 }
 
 
-TEST_P(CompressedTextureTestD3D11, PBOCompressedTexStorage)
+TEST_P(DXT1CompressedTextureTestD3D11, PBOCompressedTexStorage)
 {
     if (getClientVersion() < 3 && !extensionEnabled("GL_EXT_texture_compression_dxt1"))
     {
@@ -302,7 +309,7 @@
 }
 
 // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
-ANGLE_INSTANTIATE_TEST(CompressedTextureTest,
+ANGLE_INSTANTIATE_TEST(DXT1CompressedTextureTest,
                        ES2_D3D9(),
                        ES2_D3D11(),
                        ES2_D3D11_FL9_3(),
@@ -312,6 +319,6 @@
                        ES3_OPENGLES());
 
 // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
-ANGLE_INSTANTIATE_TEST(CompressedTextureTestES3, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGLES());
+ANGLE_INSTANTIATE_TEST(DXT1CompressedTextureTestES3, ES3_D3D11(), ES3_OPENGL(), ES3_OPENGLES());
 
-ANGLE_INSTANTIATE_TEST(CompressedTextureTestD3D11, ES2_D3D11(), ES3_D3D11(), ES2_D3D11_FL9_3());
+ANGLE_INSTANTIATE_TEST(DXT1CompressedTextureTestD3D11, ES2_D3D11(), ES3_D3D11(), ES2_D3D11_FL9_3());