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

Side by Side Diff: gpu/command_buffer/service/common_decoder_unittest.cc

Issue 465040: Added CommandBufferClient, CommandBufferStub and some IPC messages.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 command_buffer { 9 namespace gpu {
10 10
11 TEST(CommonDecoderBucket, Basic) { 11 TEST(CommonDecoderBucket, Basic) {
12 CommonDecoder::Bucket bucket; 12 CommonDecoder::Bucket bucket;
13 EXPECT_EQ(0, bucket.size()); 13 EXPECT_EQ(0, bucket.size());
14 EXPECT_TRUE(NULL == bucket.GetData(0, 0)); 14 EXPECT_TRUE(NULL == bucket.GetData(0, 0));
15 } 15 }
16 16
17 TEST(CommonDecoderBucket, Size) { 17 TEST(CommonDecoderBucket, Size) {
18 CommonDecoder::Bucket bucket; 18 CommonDecoder::Bucket bucket;
19 bucket.SetSize(24); 19 bucket.SetSize(24);
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); 407 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory);
408 EXPECT_NE(parse_error::kParseNoError, ExecuteCmd(cmd)); 408 EXPECT_NE(parse_error::kParseNoError, ExecuteCmd(cmd));
409 409
410 // Check that it fails if the size is invalid 410 // Check that it fails if the size is invalid
411 cmd.Init(kBucketId, 0, sizeof(kData) + 1, 411 cmd.Init(kBucketId, 0, sizeof(kData) + 1,
412 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory); 412 MockCommandBufferEngine::kValidShmId, kSomeOffsetInSharedMemory);
413 EXPECT_NE(parse_error::kParseNoError, ExecuteCmd(cmd)); 413 EXPECT_NE(parse_error::kParseNoError, ExecuteCmd(cmd));
414 } 414 }
415 415
416 416
417 } // namespace command_buffer 417 } // namespace gpu
418 418
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/common_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698