Refactor GL tests to use a shader library

Instead of having the same simple shaders repeated over and over in
the test code, reuse a single shader library.

BUG=angleproject:2474
TEST=angle_end2end_tests

Change-Id: I13f8ca8c0125e6d30f1761639bf8c3f69e0e77d2
Reviewed-on: https://chromium-review.googlesource.com/1012078
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/tests/gl_tests/TextureTest.cpp b/src/tests/gl_tests/TextureTest.cpp
index eecc591..08730db 100644
--- a/src/tests/gl_tests/TextureTest.cpp
+++ b/src/tests/gl_tests/TextureTest.cpp
@@ -755,13 +755,7 @@
 
     std::string getVertexShaderSource() override
     {
-        return std::string(
-            "#version 300 es\n"
-            "in vec4 position;\n"
-            "void main()\n"
-            "{\n"
-            "    gl_Position = vec4(position.xy, 0.0, 1.0);\n"
-            "}\n");
+        return std::string(essl3_shaders::vs::Simple());
     }
 
     std::string getFragmentShaderSource() override
@@ -2367,7 +2361,7 @@
     glUniform1i(mTexture0Location, 0);
     glUniform1i(mTexture1Location, 1);
 
-    drawQuad(mProgram, "position", 0.5f);
+    drawQuad(mProgram, essl3_shaders::PositionAttrib(), 0.5f);
     EXPECT_GL_NO_ERROR();
     // Red channel: width of level 1 of texture A: 32.
     // Green channel: width of level 3 of texture B: 16.