summaryrefslogtreecommitdiffstats
path: root/ui/gfx/codec
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 07:13:50 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-23 07:13:50 +0000
commit7460eb77f4b5f203b702f4eff4e85abf6dfdd307 (patch)
tree6db55dc5dad057059bb9477075820e9bd2a6dba8 /ui/gfx/codec
parent254606658571516992490bd0c128f4ab836f22b7 (diff)
downloadchromium_src-7460eb77f4b5f203b702f4eff4e85abf6dfdd307.zip
chromium_src-7460eb77f4b5f203b702f4eff4e85abf6dfdd307.tar.gz
chromium_src-7460eb77f4b5f203b702f4eff4e85abf6dfdd307.tar.bz2
Revert 86258 - Add a unit test for Motion JPEG frames.
This change adds a new unit test that verifies we can decode a JPEG image that does not have DHT markers. (This is a unit test for r85600 <http://crrev.com/85600>.) BUG=none TEST=JPEGCodec.DecodeMotionJPEG Review URL: http://codereview.chromium.org/7012034 TBR=hbono@chromium.org Review URL: http://codereview.chromium.org/7059009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86261 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/codec')
-rw-r--r--ui/gfx/codec/jpeg_codec_unittest.cc39
1 files changed, 0 insertions, 39 deletions
diff --git a/ui/gfx/codec/jpeg_codec_unittest.cc b/ui/gfx/codec/jpeg_codec_unittest.cc
index 2327149..7a8756a 100644
--- a/ui/gfx/codec/jpeg_codec_unittest.cc
+++ b/ui/gfx/codec/jpeg_codec_unittest.cc
@@ -54,26 +54,6 @@ const uint8 kTopSitesMigrationTestImage[] =
"\xfa\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00\x3f\x00\xf9"
"\xd2\x8a\x28\xaf\xc3\x0f\xf5\x4c\xff\xd9";
-// A typical Motion JPEG frame which do not have DHT markers.
-const uint8 kMotionJPEGFrame[] =
- "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x60"
- "\x00\x60\x00\x00\xff\xdb\x00\x43\x00\x02\x01\x01\x02\x01\x01\x02"
- "\x02\x02\x02\x02\x02\x02\x02\x03\x05\x03\x03\x03\x03\x03\x06\x04"
- "\x04\x03\x05\x07\x06\x07\x07\x07\x06\x07\x07\x08\x09\x0b\x09\x08"
- "\x08\x0a\x08\x07\x07\x0a\x0d\x0a\x0a\x0b\x0c\x0c\x0c\x0c\x07\x09"
- "\x0e\x0f\x0d\x0c\x0e\x0b\x0c\x0c\x0c\xff\xdb\x00\x43\x01\x02\x02"
- "\x02\x03\x03\x03\x06\x03\x03\x06\x0c\x08\x07\x08\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
- "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\xff\xc0"
- "\x00\x11\x08\x00\x40\x00\x40\x03\x01\x22\x00\x02\x11\x01\x03\x11"
- "\x01\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00\x3f\x00\xf8"
- "\xbe\x8a\x28\xaf\xe5\x33\xfd\xfc\x0a\x28\xa2\x80\x0a\x28\xa2\x80"
- "\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80"
- "\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80"
- "\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80\x0a\x28\xa2\x80"
- "\x0a\x28\xa2\x80\x3f\xff\xd9";
-
} // namespace
namespace gfx {
@@ -234,23 +214,4 @@ TEST(JPEGCodec, InvalidRead) {
&outw, &outh);
}
-// Test that we can decode a motion JPEG frame.
-TEST(JPEGCodec, DecodeMotionJPEG) {
- std::vector<unsigned char> output;
- int outw, outh;
- ASSERT_TRUE(JPEGCodec::Decode(kMotionJPEGFrame,
- arraysize(kMotionJPEGFrame),
- JPEGCodec::FORMAT_RGB, &output,
- &outw, &outh));
- EXPECT_EQ(64, outw);
- EXPECT_EQ(64, outh);
-
- ASSERT_TRUE(JPEGCodec::Decode(kMotionJPEGFrame,
- arraysize(kMotionJPEGFrame),
- JPEGCodec::FORMAT_RGBA, &output,
- &outw, &outh));
- EXPECT_EQ(64, outw);
- EXPECT_EQ(64, outh);
-}
-
} // namespace gfx