OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/common_decoder.h" | 5 #include "gpu/command_buffer/service/common_decoder.h" |
6 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 6 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 | 10 |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 cmd.Init(kBucketId, sizeof(kData) + 1, 1, | 549 cmd.Init(kBucketId, sizeof(kData) + 1, 1, |
550 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); | 550 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); |
551 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); | 551 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); |
552 | 552 |
553 // Check that it fails if the size is invalid | 553 // Check that it fails if the size is invalid |
554 cmd.Init(kBucketId, 0, sizeof(kData) + 1, | 554 cmd.Init(kBucketId, 0, sizeof(kData) + 1, |
555 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); | 555 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); |
556 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); | 556 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); |
557 } | 557 } |
558 | 558 |
559 TEST_F(CommonDecoderTest, YieldScheduler) { | |
560 cmd::YieldScheduler cmd; | |
561 cmd.Init(); | |
562 EXPECT_EQ(error::kYield, ExecuteCmd(cmd)); | |
563 } | |
564 | |
565 } // namespace gpu | 559 } // namespace gpu |
566 | 560 |
OLD | NEW |