Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: trunk/src/gpu/config/gpu_info_collector_unittest.cc

Issue 149953003: Revert 247793 "Ensure GL initialization only happens once, and p..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/gpu/config/gpu_info_collector_unittest.cc
===================================================================
--- trunk/src/gpu/config/gpu_info_collector_unittest.cc (revision 247809)
+++ trunk/src/gpu/config/gpu_info_collector_unittest.cc (working copy)
@@ -7,6 +7,7 @@
#include "gpu/config/gpu_info_collector.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_mock.h"
using ::gfx::MockGLInterface;
@@ -20,6 +21,11 @@
virtual ~GPUInfoCollectorTest() { }
virtual void SetUp() {
+ // TODO(kbr): make this setup robust in the case where
+ // GLSurface::InitializeOneOff() has already been called by
+ // another unit test. http://crbug.com/100285
+ gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
+ gfx::InitializeStaticGLBindings(gfx::kGLImplementationMockGL);
gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
::gfx::MockGLInterface::SetGLInterface(gl_.get());
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698