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

Unified Diff: remoting/codec/codec_test.cc

Issue 11195062: Improve codec tests to test a broader variety of dimensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/codec_test.cc
diff --git a/remoting/codec/codec_test.cc b/remoting/codec/codec_test.cc
index defcae80f6a894ce63343c219a5a78312040f5ff..14a3ccd9ed26d576d09320bf75a29112ba0c8774 100644
--- a/remoting/codec/codec_test.cc
+++ b/remoting/codec/codec_test.cc
@@ -357,7 +357,7 @@ static void TestEncodingRects(VideoEncoder* encoder,
}
void TestVideoEncoder(VideoEncoder* encoder, bool strict) {
- SkISize kSize = SkISize::Make(320, 240);
+ int kSizes[] = {320, 319, 317, 240, 160};
simonmorris 2012/10/19 15:48:08 int -> const int ?
Wez 2012/10/19 20:56:53 Done.
VideoEncoderMessageTester message_tester;
message_tester.set_strict(strict);
@@ -365,14 +365,21 @@ void TestVideoEncoder(VideoEncoder* encoder, bool strict) {
VideoEncoderTester tester(&message_tester);
scoped_array<uint8> memory;
- scoped_refptr<CaptureData> data =
- PrepareEncodeData(kSize, media::VideoFrame::RGB32, &memory);
- std::vector<std::vector<SkIRect> > test_rect_lists = MakeTestRectLists(kSize);
- for (size_t i = 0; i < test_rect_lists.size(); ++i) {
- const std::vector<SkIRect>& test_rects = test_rect_lists[i];
- TestEncodingRects(encoder, &tester, data,
- &test_rects[0], test_rects.size());
+ for (size_t xi = 0; xi < arraysize(kSizes); ++xi) {
+ for (size_t yi = 0; yi < arraysize(kSizes); ++yi) {
Sergey Ulanov 2012/10/19 17:50:26 whoa, it's 25 tests total. How much time does it t
Wez 2012/10/19 20:56:53 I've reduced it to sixteen sizes; I want to test f
+ SkISize size = SkISize::Make(kSizes[xi], kSizes[yi]);
+ scoped_refptr<CaptureData> data =
+ PrepareEncodeData(size, media::VideoFrame::RGB32, &memory);
Sergey Ulanov 2012/10/19 17:50:26 style police: 4 spaces indent here please.
Wez 2012/10/19 20:56:53 Done.
+
+ std::vector<std::vector<SkIRect> > test_rect_lists =
+ MakeTestRectLists(size);
+ for (size_t i = 0; i < test_rect_lists.size(); ++i) {
+ const std::vector<SkIRect>& test_rects = test_rect_lists[i];
+ TestEncodingRects(encoder, &tester, data,
+ &test_rects[0], test_rects.size());
+ }
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698