| Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
| index cae6c006b75b3b621bd50fa5daeedbf30c47988c..e65d0061cd3c7838dc297909803e0be954e541aa 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
| @@ -16,12 +16,12 @@
|
| #include "gpu/command_buffer/service/context_state.h"
|
| #include "gpu/command_buffer/service/gl_surface_mock.h"
|
| #include "gpu/command_buffer/service/gles2_cmd_decoder.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"
|
| @@ -1125,17 +1125,30 @@ TEST_P(GLES2DecoderManualInitTest, ImmutableCopyTexImage2D) {
|
| EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
|
| }
|
|
|
| -TEST_P(GLES2DecoderTest, LoseContextCHROMIUMValidArgs) {
|
| - EXPECT_CALL(*mock_decoder_, LoseContext(GL_GUILTY_CONTEXT_RESET_ARB))
|
| +TEST_P(GLES2DecoderTest, LoseContextCHROMIUMGuilty) {
|
| + EXPECT_CALL(*mock_decoder_, MarkContextLost(error::kInnocent))
|
| .Times(1);
|
| cmds::LoseContextCHROMIUM cmd;
|
| - cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_GUILTY_CONTEXT_RESET_ARB);
|
| + cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB);
|
| EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd));
|
| EXPECT_EQ(GL_NO_ERROR, GetGLError());
|
| + EXPECT_TRUE(decoder_->WasContextLost());
|
| + EXPECT_TRUE(decoder_->WasContextLostByRobustnessExtension());
|
| +}
|
| +
|
| +TEST_P(GLES2DecoderTest, LoseContextCHROMIUMUnkown) {
|
| + EXPECT_CALL(*mock_decoder_, MarkContextLost(error::kUnknown))
|
| + .Times(1);
|
| + cmds::LoseContextCHROMIUM cmd;
|
| + cmd.Init(GL_UNKNOWN_CONTEXT_RESET_ARB, GL_UNKNOWN_CONTEXT_RESET_ARB);
|
| + EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd));
|
| + EXPECT_EQ(GL_NO_ERROR, GetGLError());
|
| + EXPECT_TRUE(decoder_->WasContextLost());
|
| + EXPECT_TRUE(decoder_->WasContextLostByRobustnessExtension());
|
| }
|
|
|
| TEST_P(GLES2DecoderTest, LoseContextCHROMIUMInvalidArgs0_0) {
|
| - EXPECT_CALL(*mock_decoder_, LoseContext(_))
|
| + EXPECT_CALL(*mock_decoder_, MarkContextLost(_))
|
| .Times(0);
|
| cmds::LoseContextCHROMIUM cmd;
|
| cmd.Init(GL_NONE, GL_GUILTY_CONTEXT_RESET_ARB);
|
| @@ -1144,7 +1157,7 @@ TEST_P(GLES2DecoderTest, LoseContextCHROMIUMInvalidArgs0_0) {
|
| }
|
|
|
| TEST_P(GLES2DecoderTest, LoseContextCHROMIUMInvalidArgs1_0) {
|
| - EXPECT_CALL(*mock_decoder_, LoseContext(_))
|
| + EXPECT_CALL(*mock_decoder_, MarkContextLost(_))
|
| .Times(0);
|
| cmds::LoseContextCHROMIUM cmd;
|
| cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_NONE);
|
|
|