Ensure that removing last extension from GrGLExtension doesn't assert.
This patch fixes an assert that triggers when removing the last
extension in the list, since the index operator goes out of bounds.
Added a test that fails without the code changes and passes with the
changes.
R=bsalomon@chromium.org
Change-Id: I0d561b150899c178f638dde088af773fddf112d9
Reviewed-on: https://skia-review.googlesource.com/72000
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/gn/tests.gni b/gn/tests.gni
index 02cc45f..6579820 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -91,6 +91,7 @@
"$_tests/GrCCPRTest.cpp",
"$_tests/GrContextAbandonTest.cpp",
"$_tests/GrContextFactoryTest.cpp",
+ "$_tests/GrGLExtensionsTest.cpp",
"$_tests/GrMemoryPoolTest.cpp",
"$_tests/GrMeshTest.cpp",
"$_tests/GrMipMappedTest.cpp",