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

Unified Diff: tests/GifTest.cpp

Issue 132403008: Remove unnamed namespace usage from tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tests/GifTest.cpp
diff --git a/tests/GifTest.cpp b/tests/GifTest.cpp
index c9dac9b497a6bcc65e518942646c3cd3589321c2..7162d8c7d734111c10467ebd86e7ad3210daf4d0 100644
--- a/tests/GifTest.cpp
+++ b/tests/GifTest.cpp
@@ -22,43 +22,36 @@
__SK_FORCE_IMAGE_DECODER_LINKING;
robertphillips 2014/01/14 13:19:37 Maybe make these gGIFData, gGIFDataNoColormap and
tfarina 2014/01/21 23:37:43 Done.
-namespace {
- unsigned char gifData[] = {
- 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x03, 0x00,
- 0x03, 0x00, 0xe3, 0x08, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
- 0xff, 0x80, 0x80, 0x80, 0x00, 0xff, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x00, 0x00,
- 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x04,
- 0x07, 0x50, 0x1c, 0x43, 0x40, 0x41, 0x23, 0x44,
- 0x00, 0x3b};
- unsigned char gifDataNoColormap[] = {
- 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04,
- 0x01, 0x0a, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02,
- 0x02, 0x4c, 0x01, 0x00, 0x3b};
- unsigned char interlacedGif[] = {
- 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x09, 0x00,
- 0x09, 0x00, 0xe3, 0x08, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
- 0xff, 0x80, 0x80, 0x80, 0x00, 0xff, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x00, 0x00,
- 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x40, 0x04,
- 0x1b, 0x50, 0x1c, 0x23, 0xe9, 0x44, 0x23, 0x60,
- 0x9d, 0x09, 0x28, 0x1e, 0xf8, 0x6d, 0x64, 0x56,
- 0x9d, 0x53, 0xa8, 0x7e, 0xa8, 0x65, 0x94, 0x5c,
- 0xb0, 0x8a, 0x45, 0x04, 0x00, 0x3b};
-}; // namespace
+static unsigned char gifData[] = {
+ 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
+ 0xff, 0x80, 0x80, 0x80, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x04,
+ 0x07, 0x50, 0x1c, 0x43, 0x40, 0x41, 0x23, 0x44, 0x00, 0x3b
+};
+
+static unsigned char gifDataNoColormap[] = {
+ 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x21, 0xf9, 0x04, 0x01, 0x0a, 0x00, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x4c, 0x01, 0x00, 0x3b
+};
+
+static unsigned char interlacedGif[] = {
+ 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x09, 0x00, 0x09, 0x00, 0xe3, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, 0xff, 0x80,
+ 0x80, 0x80, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x09, 0x00, 0x40, 0x04, 0x1b, 0x50, 0x1c, 0x23, 0xe9, 0x44,
+ 0x23, 0x60, 0x9d, 0x09, 0x28, 0x1e, 0xf8, 0x6d, 0x64, 0x56, 0x9d, 0x53, 0xa8,
+ 0x7e, 0xa8, 0x65, 0x94, 0x5c, 0xb0, 0x8a, 0x45, 0x04, 0x00, 0x3b
+};
static void test_gif_data_no_colormap(skiatest::Reporter* r,
- void* data, size_t size) {
+ void* data,
+ size_t size) {
SkBitmap bm;
bool imageDecodeSuccess = SkImageDecoder::DecodeMemory(
data, size, &bm);

Powered by Google App Engine
This is Rietveld 408576698