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

Side by Side Diff: media/omx/omx_codec_unittest.cc

Issue 6300001: Clang: enable -Wbool-conversions and -Wunused-variables on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, undo indent Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_util_unittest.cc ('k') | net/base/cert_database_nss_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #define _CRT_SECURE_NO_WARNINGS 5 #define _CRT_SECURE_NO_WARNINGS
6 6
7 #if 0 7 #if 0
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 EXPECT_EQ(kBufferCount, static_cast<int>(input_units_.size())); 411 EXPECT_EQ(kBufferCount, static_cast<int>(input_units_.size()));
412 EXPECT_EQ(kBufferCount, static_cast<int>(output_units_.size())); 412 EXPECT_EQ(kBufferCount, static_cast<int>(output_units_.size()));
413 EXPECT_EQ(count, static_cast<int>(output_pool_.size())); 413 EXPECT_EQ(count, static_cast<int>(output_pool_.size()));
414 output_units_.clear(); 414 output_units_.clear();
415 415
416 // Send EndOfStream, expect eos flag. 416 // Send EndOfStream, expect eos flag.
417 SendEOSInputBuffer(); 417 SendEOSInputBuffer();
418 EXPECT_EQ(kBufferCount - 1, static_cast<int>(input_units_.size())); 418 EXPECT_EQ(kBufferCount - 1, static_cast<int>(input_units_.size()));
419 EXPECT_EQ(1, static_cast<int>(output_units_.size())); 419 EXPECT_EQ(1, static_cast<int>(output_units_.size()));
420 EXPECT_EQ(count - 1, static_cast<int>(output_pool_.size())); 420 EXPECT_EQ(count - 1, static_cast<int>(output_pool_.size()));
421 EXPECT_EQ(true, got_eos_); 421 EXPECT_TRUE(got_eos_);
422 422
423 // Shutdown. 423 // Shutdown.
424 ExpectStop(); 424 ExpectStop();
425 omx_engine_->Stop(stop_task_.CreateTask()); 425 omx_engine_->Stop(stop_task_.CreateTask());
426 message_loop_.RunAllPending(); 426 message_loop_.RunAllPending();
427 } 427 }
428 428
429 TEST_F(OmxCodecTest, RecycleInputBuffers) { 429 TEST_F(OmxCodecTest, RecycleInputBuffers) {
430 ExpectSettings(); 430 ExpectSettings();
431 ExpectStart(); 431 ExpectStart();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 EXPECT_EQ(kBufferCount, static_cast<int>(input_units_.size())); 463 EXPECT_EQ(kBufferCount, static_cast<int>(input_units_.size()));
464 EXPECT_EQ(repeat_count, static_cast<int>(output_units_.size())); 464 EXPECT_EQ(repeat_count, static_cast<int>(output_units_.size()));
465 EXPECT_EQ(count, static_cast<int>(output_pool_.size())); 465 EXPECT_EQ(count, static_cast<int>(output_pool_.size()));
466 output_units_.clear(); 466 output_units_.clear();
467 467
468 // Send EndOfStream, expect eos flag. 468 // Send EndOfStream, expect eos flag.
469 SendEOSInputBuffer(); 469 SendEOSInputBuffer();
470 EXPECT_EQ(kBufferCount - 1, static_cast<int>(input_units_.size())); 470 EXPECT_EQ(kBufferCount - 1, static_cast<int>(input_units_.size()));
471 EXPECT_EQ(1, static_cast<int>(output_units_.size())); 471 EXPECT_EQ(1, static_cast<int>(output_units_.size()));
472 EXPECT_EQ(count - 1, static_cast<int>(output_pool_.size())); 472 EXPECT_EQ(count - 1, static_cast<int>(output_pool_.size()));
473 EXPECT_EQ(true, got_eos_); 473 EXPECT_TRUE(got_eos_);
474 474
475 // Shutdown. 475 // Shutdown.
476 ExpectStop(); 476 ExpectStop();
477 omx_engine_->Stop(stop_task_.CreateTask()); 477 omx_engine_->Stop(stop_task_.CreateTask());
478 message_loop_.RunAllPending(); 478 message_loop_.RunAllPending();
479 } 479 }
480 480
481 // TODO(hclam): Add test case for dynamic port config. 481 // TODO(hclam): Add test case for dynamic port config.
482 // TODO(hclam): Create a more complicated test case so that read 482 // TODO(hclam): Create a more complicated test case so that read
483 // requests and reply from FillThisBuffer() arrives out of order. 483 // requests and reply from FillThisBuffer() arrives out of order.
484 484
485 } // namespace media 485 } // namespace media
486 #endif 486 #endif
OLDNEW
« no previous file with comments | « media/audio/audio_util_unittest.cc ('k') | net/base/cert_database_nss_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698