Refactor all the Bind* GLES 2.0 entry points.

This requires storing a reference the the Context's Framebuffer map
in the ValidationContext. Likely we'll need to do this as well for
the other non-shared object types.

BUG=angleproject:747

Change-Id: I73ee8b0be3c3b9e54b7e48e49d6f738cf1d926dd
Reviewed-on: https://chromium-review.googlesource.com/407843
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES_unittest.cpp b/src/libANGLE/validationES_unittest.cpp
index 3cb5311..925005a 100644
--- a/src/libANGLE/validationES_unittest.cpp
+++ b/src/libANGLE/validationES_unittest.cpp
@@ -36,6 +36,7 @@
                           const Extensions &extensions,
                           const ResourceManager *resourceManager,
                           const Limitations &limitations,
+                          const ResourceMap<Framebuffer> &framebufferMap,
                           bool skipValidation);
 
     MOCK_METHOD1(handleError, void(const Error &));
@@ -48,6 +49,7 @@
                                              const Extensions &extensions,
                                              const ResourceManager *resourceManager,
                                              const Limitations &limitations,
+                                             const ResourceMap<Framebuffer> &framebufferMap,
                                              bool skipValidation)
     : ValidationContext(version,
                         state,
@@ -56,6 +58,7 @@
                         extensions,
                         resourceManager,
                         limitations,
+                        framebufferMap,
                         skipValidation)
 {
 }
@@ -79,6 +82,7 @@
     TextureCapsMap textureCaps;
     Extensions extensions;
     Limitations limitations;
+    ResourceMap<Framebuffer> framebufferMap;
 
     // Set some basic caps.
     caps.maxElementIndex     = 100;
@@ -106,7 +110,8 @@
     state.setProgram(program);
 
     NiceMock<MockValidationContext> testContext(Version(3, 0), &state, caps, textureCaps,
-                                                extensions, nullptr, limitations, false);
+                                                extensions, nullptr, limitations, framebufferMap,
+                                                false);
 
     // Set the expectation for the validation error here.
     Error expectedError(GL_INVALID_OPERATION, g_ExceedsMaxElementErrorMessage);