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

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

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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: gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index 957b53bf2e52afb22aefe60f735b439396b0191e..3d6ea41f01c83e00cad3949c2aa97685b6102e34 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -17,12 +17,12 @@
#include "gpu/command_buffer/service/gl_surface_mock.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/image_manager.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/mocks.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/test_helper.h"
+#include "gpu/config/gpu_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_mock.h"
@@ -736,35 +736,6 @@ TEST_P(GLES2DecoderWithShaderTest, DrawArraysSimulatedAttrib0OOMFails) {
EXPECT_FALSE(GetDecoder()->WasContextLost());
}
-// Test that we lose context.
-TEST_P(GLES2DecoderManualInitTest, LoseContextWhenOOM) {
- InitState init;
- init.has_alpha = true;
- init.has_depth = true;
- init.request_alpha = true;
- init.request_depth = true;
- init.bind_generates_resource = true;
- init.lose_context_when_out_of_memory = true;
- InitDecoder(init);
- SetupDefaultProgram();
-
- const GLsizei kFakeLargeCount = 0x1234;
- SetupTexture();
- AddExpectationsForSimulatedAttrib0WithError(
- kFakeLargeCount, 0, GL_OUT_OF_MEMORY);
- EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation();
- // Other contexts in the group should be lost also.
- EXPECT_CALL(*mock_decoder_, LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB))
- .Times(1)
- .RetiresOnSaturation();
- DrawArrays cmd;
- cmd.Init(GL_TRIANGLES, 0, kFakeLargeCount);
- // This context should be lost.
- EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd));
- EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError());
- EXPECT_TRUE(decoder_->WasContextLost());
-}
-
TEST_P(GLES2DecoderWithShaderTest, DrawArraysBadTextureUsesBlack) {
DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
// This is an NPOT texture. As the default filtering requires mips

Powered by Google App Engine
This is Rietveld 408576698