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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager_unittest.cc

Issue 14308014: Clean up of GLES2 Command Decoder by moving some of the error state into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge error. Created 7 years, 8 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
« no previous file with comments | « gpu/command_buffer/service/vertex_attrib_manager.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
diff --git a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
index e8eb6a4db86a2c1bcd13effded372adc071b4a4c..28a051c97b2fb003671dfa5af7e966325b67474a 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
@@ -6,8 +6,8 @@
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/buffer_manager.h"
+#include "gpu/command_buffer/service/error_state_mock.h"
#include "gpu/command_buffer/service/feature_info.h"
-#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_mock.h"
@@ -142,7 +142,7 @@ TEST_F(VertexAttribManagerTest, HaveFixedAttribs) {
}
TEST_F(VertexAttribManagerTest, CanAccess) {
- MockGLES2Decoder decoder;
+ MockErrorState error_state;
BufferManager buffer_manager(NULL, NULL);
buffer_manager.CreateBuffer(1, 2);
Buffer* buffer = buffer_manager.GetBuffer(1);
@@ -159,13 +159,13 @@ TEST_F(VertexAttribManagerTest, CanAccess) {
EXPECT_TRUE(buffer_manager.SetTarget(buffer, GL_ARRAY_BUFFER));
TestHelper::DoBufferData(
- gl_.get(), &decoder, &buffer_manager, buffer, 15, GL_STATIC_DRAW, NULL,
- GL_NO_ERROR);
+ gl_.get(), &error_state, &buffer_manager, buffer, 15, GL_STATIC_DRAW,
+ NULL, GL_NO_ERROR);
EXPECT_FALSE(attrib->CanAccess(0));
TestHelper::DoBufferData(
- gl_.get(), &decoder, &buffer_manager, buffer, 16, GL_STATIC_DRAW, NULL,
- GL_NO_ERROR);
+ gl_.get(), &error_state, &buffer_manager, buffer, 16, GL_STATIC_DRAW,
+ NULL, GL_NO_ERROR);
EXPECT_TRUE(attrib->CanAccess(0));
EXPECT_FALSE(attrib->CanAccess(1));
@@ -173,8 +173,8 @@ TEST_F(VertexAttribManagerTest, CanAccess) {
EXPECT_FALSE(attrib->CanAccess(0));
TestHelper::DoBufferData(
- gl_.get(), &decoder, &buffer_manager, buffer, 32, GL_STATIC_DRAW, NULL,
- GL_NO_ERROR);
+ gl_.get(), &error_state, &buffer_manager, buffer, 32, GL_STATIC_DRAW,
+ NULL, GL_NO_ERROR);
EXPECT_TRUE(attrib->CanAccess(0));
EXPECT_FALSE(attrib->CanAccess(1));
manager_->SetAttribInfo(1, buffer, 4, GL_FLOAT, GL_FALSE, 0, 16, 0);
« no previous file with comments | « gpu/command_buffer/service/vertex_attrib_manager.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698