Clean up end2end tests for Intel OSX.

BUG=angleproject:2205
BUG=angleproject:2041
BUG=angleproject:2155

Change-Id: I26bcbb63e147787cd342ec80a86d60cf230be4c9
Reviewed-on: https://chromium-review.googlesource.com/913108
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/ClearTest.cpp b/src/tests/gl_tests/ClearTest.cpp
index 24b2416..c50121e 100644
--- a/src/tests/gl_tests/ClearTest.cpp
+++ b/src/tests/gl_tests/ClearTest.cpp
@@ -282,15 +282,6 @@
 // attachment
 TEST_P(ClearTestES3, MixedSRGBClear)
 {
-    // TODO(cwallez) figure out why it is broken on Intel on Mac
-#if defined(ANGLE_PLATFORM_APPLE)
-    if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-    {
-        std::cout << "Test skipped on Intel on Mac." << std::endl;
-        return;
-    }
-#endif
-
     glBindFramebuffer(GL_FRAMEBUFFER, mFBOs[0]);
 
     GLuint textures[2];
diff --git a/src/tests/gl_tests/FramebufferTest.cpp b/src/tests/gl_tests/FramebufferTest.cpp
index b3149a4..ece99b0 100644
--- a/src/tests/gl_tests/FramebufferTest.cpp
+++ b/src/tests/gl_tests/FramebufferTest.cpp
@@ -97,13 +97,6 @@
                                            GLenum attachmentType,
                                            GLenum internalFormat)
     {
-        // TODO(geofflang): Figure out why this is broken on Intel OpenGL
-        if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-        {
-            std::cout << "Test skipped on Intel OpenGL." << std::endl;
-            return;
-        }
-
         int clientVersion = getClientMajorVersion();
         if (clientVersion < minESVersion)
         {
diff --git a/src/tests/gl_tests/GLSLTest.cpp b/src/tests/gl_tests/GLSLTest.cpp
index 63891d4..7a6f18d 100644
--- a/src/tests/gl_tests/GLSLTest.cpp
+++ b/src/tests/gl_tests/GLSLTest.cpp
@@ -2965,14 +2965,6 @@
         return;
     }
 
-    if (IsOSX() && IsOpenGL())
-    {
-        // http://anglebug.com/2041
-        std::cout << "Test skipped on Mac OpenGL because local variable initialization is disabled."
-                  << std::endl;
-        return;
-    }
-
     const std::string &fragmentShader =
         "precision mediump float;\n"
         "struct T\n"
@@ -3062,14 +3054,6 @@
         return;
     }
 
-    if (IsOSX() && IsOpenGL())
-    {
-        // http://anglebug.com/2041
-        std::cout << "Test skipped on Mac OpenGL because local variable initialization is disabled."
-                  << std::endl;
-        return;
-    }
-
     const std::string &fragmentShader =
         "#version 300 es\n"
         "precision highp float;\n"
diff --git a/src/tests/gl_tests/PackUnpackTest.cpp b/src/tests/gl_tests/PackUnpackTest.cpp
index d86f526..3263cf1 100644
--- a/src/tests/gl_tests/PackUnpackTest.cpp
+++ b/src/tests/gl_tests/PackUnpackTest.cpp
@@ -174,15 +174,6 @@
 // Test the correctness of packHalf2x16 and unpackHalf2x16 functions calculating normal floating numbers.
 TEST_P(PackUnpackTest, PackUnpackHalfNormal)
 {
-    // TODO(cwallez) figure out why it is broken on Intel on Mac
-#if defined(ANGLE_PLATFORM_APPLE)
-    if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-    {
-        std::cout << "Test skipped on Intel on Mac." << std::endl;
-        return;
-    }
-#endif
-
     // Expect the shader to output the same value as the input
     compareBeforeAfter(mHalfProgram, 0.5f, -0.2f);
     compareBeforeAfter(mHalfProgram, -0.35f, 0.75f);
diff --git a/src/tests/gl_tests/SRGBTextureTest.cpp b/src/tests/gl_tests/SRGBTextureTest.cpp
index 251d787..b996f04 100644
--- a/src/tests/gl_tests/SRGBTextureTest.cpp
+++ b/src/tests/gl_tests/SRGBTextureTest.cpp
@@ -286,11 +286,7 @@
         return;
     }
 
-    if (IsOpenGL() && (IsIntel() || IsAMD()))
-    {
-        std::cout << "Test skipped on Intel and AMD OpenGL drivers." << std::endl;
-        return;
-    }
+    ANGLE_SKIP_TEST_IF(IsOpenGL() && ((IsIntel() && IsOSX()) || IsAMD()));
 
     auto createAndReadBackTexture = [this](GLenum internalFormat, const GLColor &color) {
         constexpr GLsizei width  = 128;
diff --git a/src/tests/gl_tests/SwizzleTest.cpp b/src/tests/gl_tests/SwizzleTest.cpp
index e82f11d..2c83f5c 100644
--- a/src/tests/gl_tests/SwizzleTest.cpp
+++ b/src/tests/gl_tests/SwizzleTest.cpp
@@ -140,13 +140,6 @@
 
     void runTest2D()
     {
-        // TODO(jmadill): Figure out why this fails on Intel.
-        if (IsIntel() && GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-        {
-            std::cout << "Test skipped on Intel." << std::endl;
-            return;
-        }
-
         glUseProgram(mProgram);
         glBindTexture(GL_TEXTURE_2D, mTexture);
         glUniform1i(mTextureUniformLocation, 0);
diff --git a/src/tests/gl_tests/TextureTest.cpp b/src/tests/gl_tests/TextureTest.cpp
index 5897ac5..7e8a954 100644
--- a/src/tests/gl_tests/TextureTest.cpp
+++ b/src/tests/gl_tests/TextureTest.cpp
@@ -1765,12 +1765,6 @@
         std::cout << "Test skipped on AMD OpenGL." << std::endl;
         return;
     }
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_2D, mTexture2D);
     std::vector<GLColor> texDataGreen(2u * 2u, GLColor::green);
@@ -1797,12 +1791,6 @@
         std::cout << "Test skipped on AMD OpenGL." << std::endl;
         return;
     }
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_2D, mTexture2D);
     std::vector<GLColor> texDataGreen(2u * 2u, GLColor::green);
@@ -1832,12 +1820,6 @@
 // GLES 3.0.4 section 3.8.13 Texture completeness
 TEST_P(Texture2DTestES3, DrawWithLevelsOutsideRangeWithInconsistentDimensions)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_2D, mTexture2D);
     std::vector<GLColor> texDataRed(8u * 8u, GLColor::red);
@@ -1865,13 +1847,7 @@
 
     EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green);
 
-    if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-    {
-        // Intel was observed drawing color 0,0,0,0 instead of the texture color after the base
-        // level was changed.
-        std::cout << "Test partially skipped on Intel OpenGL." << std::endl;
-        return;
-    }
+    ANGLE_SKIP_TEST_IF(IsIntel() && IsWindows() && IsOpenGL());
 
     // Switch the level that is being used to the cyan level 2.
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 2);
@@ -1888,12 +1864,6 @@
 // have images defined.
 TEST_P(Texture3DTestES3, DrawWithLevelsOutsideRangeUndefined)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_3D, mTexture3D);
     std::vector<GLColor> texDataGreen(2u * 2u * 2u, GLColor::green);
@@ -1916,12 +1886,6 @@
 // GLES 3.0.4 section 3.8.13 Texture completeness
 TEST_P(Texture3DTestES3, DrawWithLevelsOutsideRangeWithInconsistentDimensions)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_3D, mTexture3D);
     std::vector<GLColor> texDataRed(8u * 8u * 8u, GLColor::red);
@@ -1950,13 +1914,7 @@
 
     EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green);
 
-    if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-    {
-        // Intel was observed drawing color 0,0,0,0 instead of the texture color after the base
-        // level was changed.
-        std::cout << "Test partially skipped on Intel OpenGL." << std::endl;
-        return;
-    }
+    ANGLE_SKIP_TEST_IF(IsIntel() && IsWindows() && IsOpenGL());
 
     // Switch the level that is being used to the cyan level 2.
     glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, 2);
@@ -1973,12 +1931,6 @@
 // have images defined.
 TEST_P(Texture2DArrayTestES3, DrawWithLevelsOutsideRangeUndefined)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_2D_ARRAY, m2DArrayTexture);
     std::vector<GLColor> texDataGreen(2u * 2u * 2u, GLColor::green);
@@ -2001,12 +1953,6 @@
 // GLES 3.0.4 section 3.8.13 Texture completeness
 TEST_P(Texture2DArrayTestES3, DrawWithLevelsOutsideRangeWithInconsistentDimensions)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_3D, m2DArrayTexture);
     std::vector<GLColor> texDataRed(8u * 8u * 8u, GLColor::red);
@@ -2035,13 +1981,8 @@
 
     EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::green);
 
-    if (IsIntel() && getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE)
-    {
-        // Intel was observed drawing color 0,0,0,0 instead of the texture color after the base
-        // level was changed.
-        std::cout << "Test partially skipped on Intel OpenGL." << std::endl;
-        return;
-    }
+    ANGLE_SKIP_TEST_IF(IsIntel() && IsWindows() && IsOpenGL());
+
     if (IsNVIDIA() && (getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE ||
                        getPlatformRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE))
     {
@@ -2066,13 +2007,6 @@
 // GLES 3.0.4 section 3.8.13 Texture completeness
 TEST_P(Texture2DTestES3, TextureCompletenessChangesWithMaxLevel)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
-
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_2D, mTexture2D);
     std::vector<GLColor> texDataGreen(8u * 8u, GLColor::green);
@@ -2112,13 +2046,6 @@
 // GLES 3.0.4 section 3.8.13 Texture completeness
 TEST_P(Texture3DTestES3, Texture3DCompletenessChangesWithMaxLevel)
 {
-    if (IsOSX())
-    {
-        // Observed incorrect rendering on OSX.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
-
     glActiveTexture(GL_TEXTURE0);
     glBindTexture(GL_TEXTURE_3D, mTexture3D);
     std::vector<GLColor> texDataGreen(2u * 2u * 2u, GLColor::green);
@@ -3489,9 +3416,6 @@
 // Tests unpacking into the unsized GL_ALPHA format.
 TEST_P(Texture2DTestES3, UnsizedAlphaUnpackBuffer)
 {
-    // TODO(jmadill): Figure out why this fails on OSX.
-    ANGLE_SKIP_TEST_IF(IsOSX());
-
     // Initialize the texure.
     glBindTexture(GL_TEXTURE_2D, mTexture2D);
     glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, getWindowWidth(), getWindowHeight(), 0, GL_ALPHA,
@@ -3794,12 +3718,9 @@
 // samples the cubemap using a direction vector (1,1,1).
 TEST_P(TextureCubeTestES3, SpecifyAndSampleFromBaseLevel1)
 {
-    if (IsOSX())
-    {
-        // Check http://anglebug.com/2155.
-        std::cout << "Test skipped on OSX." << std::endl;
-        return;
-    }
+    // Check http://anglebug.com/2155.
+    ANGLE_SKIP_TEST_IF(IsOSX() && IsNVIDIA());
+
     const std::string vs =
         R"(#version 300 es
         precision mediump float;
diff --git a/src/tests/gl_tests/TransformFeedbackTest.cpp b/src/tests/gl_tests/TransformFeedbackTest.cpp
index 2721b2c..fc8ee1b 100644
--- a/src/tests/gl_tests/TransformFeedbackTest.cpp
+++ b/src/tests/gl_tests/TransformFeedbackTest.cpp
@@ -498,11 +498,7 @@
 // contexts returns the correct results.  Helps expose bugs in ANGLE's virtual contexts.
 TEST_P(TransformFeedbackTest, MultiContext)
 {
-    if (IsOSX() && (IsNVIDIA() || IsAMD() || IsIntel()) && IsOpenGL())
-    {
-        std::cout << "Test skipped on NVIDIA, AMD and Intel OpenGL on OSX." << std::endl;
-        return;
-    }
+    ANGLE_SKIP_TEST_IF(IsOSX() && (IsNVIDIA() || IsAMD()) && IsOpenGL());
 
     if (IsLinux() && IsAMD() && IsOpenGL())
     {