LineLoopTest: Fix the test not rendering anything.

BUG=angleproject:1063

Change-Id: Id0772b5c8479150a1e736aa7cd35ec6444753278
Reviewed-on: https://chromium-review.googlesource.com/285126
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/gl_tests/LineLoopTest.cpp b/src/tests/gl_tests/LineLoopTest.cpp
index 305155b..383ec51 100644
--- a/src/tests/gl_tests/LineLoopTest.cpp
+++ b/src/tests/gl_tests/LineLoopTest.cpp
@@ -51,13 +51,11 @@
         }
 
         mPositionLocation = glGetAttribLocation(mProgram, "position");
-        mColorLocation = glGetUniformLocation(mProgram, "in_color");
+        mColorLocation = glGetUniformLocation(mProgram, "color");
 
         glBlendFunc(GL_ONE, GL_ONE);
         glEnable(GL_BLEND);
-
         glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
-        glClear(GL_COLOR_BUFFER_BIT);
 
         ASSERT_GL_NO_ERROR();
     }
@@ -71,6 +69,8 @@
 
     void runTest(GLenum indexType, GLuint indexBuffer, const GLvoid *indexPtr)
     {
+        glClear(GL_COLOR_BUFFER_BIT);
+
         static const GLfloat loopPositions[] =
         {
              0.0f,  0.0f,
@@ -94,7 +94,7 @@
         };
         static const GLubyte stripIndices[] =
         {
-            2, 0, 3, 1, 2
+            1, 0, 3, 2, 1
         };
 
         glUseProgram(mProgram);
@@ -112,6 +112,8 @@
         std::vector<GLubyte> pixels(getWindowWidth() * getWindowHeight() * 4);
         glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]);
 
+        ASSERT_GL_NO_ERROR();
+
         for (int y = 0; y < getWindowHeight(); y++)
         {
             for (int x = 0; x < getWindowWidth(); x++)