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

Issue 331293005: Revert of gpu: Add base class for gpu service tests (Closed)

Created:
6 years, 6 months ago by pfeldman
Modified:
6 years, 6 months ago
Reviewers:
danakj, no sievers
CC:
chromium-reviews, piman+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Revert of gpu: Add base class for gpu service tests (https://codereview.chromium.org/332303002/) Reason for revert: Broke GN build: http://build.chromium.org/p/chromium.webkit/builders/Linux%20GN/builds/1396/steps/compile/logs/stdio Original issue's description: > gpu: Add base class for gpu service tests > > This allows for properly setting up and tearing down GL bindings. > Before this patch bindings were intialized in unittest_main.cc but also > reinitialized with a different GL version and extension in some > GLES2CmdDecoderTests which leaves room for problems depending on which order > tests happen to run in. > > More importantly, this will allow me to initialize GL bindings with a certain > GL version and extension bindings for some tests. > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278059 TBR=danakj@chromium.org,sievers@chromium.org NOTREECHECKS=true NOTRY=true

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -178 lines) Patch
M gpu/command_buffer/common/unittest_main.cc View 2 chunks +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/buffer_manager_unittest.cc View 4 chunks +7 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 3 chunks +11 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/feature_info_unittest.cc View 5 chunks +11 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/framebuffer_manager_unittest.cc View 6 chunks +23 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 chunk +0 lines, -1 line 0 comments Download
D gpu/command_buffer/service/gpu_service_test.h View 1 chunk +0 lines, -42 lines 0 comments Download
D gpu/command_buffer/service/gpu_service_test.cc View 1 chunk +0 lines, -50 lines 0 comments Download
M gpu/command_buffer/service/gpu_tracer_unittest.cc View 5 chunks +6 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager_unittest.cc View 5 chunks +14 lines, -23 lines 0 comments Download
M gpu/command_buffer/service/memory_program_cache_unittest.cc View 5 chunks +10 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/program_manager_unittest.cc View 12 chunks +33 lines, -6 lines 0 comments Download
M gpu/command_buffer/service/query_manager_unittest.cc View 5 chunks +8 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/renderbuffer_manager_unittest.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M gpu/command_buffer/service/shader_manager_unittest.cc View 3 chunks +13 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/texture_manager_unittest.cc View 12 chunks +23 lines, -10 lines 0 comments Download
M gpu/command_buffer/service/vertex_array_manager_unittest.cc View 3 chunks +11 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/vertex_attrib_manager_unittest.cc View 4 chunks +11 lines, -3 lines 0 comments Download
M gpu/gpu.gyp View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
pfeldman
Created Revert of gpu: Add base class for gpu service tests
6 years, 6 months ago (2014-06-18 14:55:21 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pfeldman@chromium.org/331293005/1
6 years, 6 months ago (2014-06-18 14:55:59 UTC) #2
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-18 14:57:37 UTC) #3
commit-bot: I haz the power
6 years, 6 months ago (2014-06-18 14:57:38 UTC) #4
Failed to apply patch for gpu/command_buffer/common/unittest_main.cc:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file gpu/command_buffer/common/unittest_main.cc
  Hunk #1 FAILED at 9.
  Hunk #2 succeeded at 19 with fuzz 2 (offset 3 lines).
  1 out of 2 hunks FAILED -- saving rejects to file
gpu/command_buffer/common/unittest_main.cc.rej

Patch:       gpu/command_buffer/common/unittest_main.cc
Index: gpu/command_buffer/common/unittest_main.cc
diff --git a/gpu/command_buffer/common/unittest_main.cc
b/gpu/command_buffer/common/unittest_main.cc
index
2d6a2d116ea7aa454793ed95a2d71dcf51fc7456..358805a310c33479a795b07c9b685d9870e515c6
100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -9,6 +9,9 @@
 #include "base/test/test_suite.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"
+#include "ui/gl/gl_surface.h"
 
 namespace {
 
@@ -16,6 +19,13 @@
  public:
   NoAtExitBaseTestSuite(int argc, char** argv)
       : base::TestSuite(argc, argv, false) {
+  }
+
+  virtual void Initialize() OVERRIDE {
+    base::TestSuite::Initialize();
+    gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
+    gfx::GLSurface::InitializeOneOffWithMockBindingsForTests();
+    gfx::GLSurface::InitializeDynamicMockBindingsForTests(NULL);
   }
 };

Powered by Google App Engine
This is Rietveld 408576698