| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "platform/SharedBuffer.h" | 41 #include "platform/SharedBuffer.h" |
| 42 #include "platform/exported/WrappedResourceResponse.h" | 42 #include "platform/exported/WrappedResourceResponse.h" |
| 43 #include "platform/graphics/Image.h" | 43 #include "platform/graphics/Image.h" |
| 44 #include "platform/testing/URLTestHelpers.h" | 44 #include "platform/testing/URLTestHelpers.h" |
| 45 #include "platform/testing/UnitTestHelpers.h" | 45 #include "platform/testing/UnitTestHelpers.h" |
| 46 #include "public/platform/Platform.h" | 46 #include "public/platform/Platform.h" |
| 47 #include "public/platform/WebURL.h" | 47 #include "public/platform/WebURL.h" |
| 48 #include "public/platform/WebURLResponse.h" | 48 #include "public/platform/WebURLResponse.h" |
| 49 #include "public/platform/WebUnitTestSupport.h" | 49 #include "public/platform/WebUnitTestSupport.h" |
| 50 | 50 |
| 51 using namespace blink; | 51 namespace blink { |
| 52 | |
| 53 namespace { | |
| 54 | 52 |
| 55 static Vector<unsigned char> jpegImage() | 53 static Vector<unsigned char> jpegImage() |
| 56 { | 54 { |
| 57 Vector<unsigned char> jpeg; | 55 Vector<unsigned char> jpeg; |
| 58 | 56 |
| 59 static const unsigned char data[] = { | 57 static const unsigned char data[] = { |
| 60 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01,
0x01, 0x01, 0x00, | 58 0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01,
0x01, 0x01, 0x00, |
| 61 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x13, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, | 59 0x48, 0x00, 0x48, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x13, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, |
| 62 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0xff,
0xdb, 0x00, 0x43, | 60 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0xff,
0xdb, 0x00, 0x43, |
| 63 0x00, 0x05, 0x03, 0x04, 0x04, 0x04, 0x03, 0x05, 0x04, 0x04, 0x04, 0x05,
0x05, 0x05, 0x06, | 61 0x00, 0x05, 0x03, 0x04, 0x04, 0x04, 0x03, 0x05, 0x04, 0x04, 0x04, 0x05,
0x05, 0x05, 0x06, |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 ASSERT_TRUE(cachedImage->hasImage()); | 220 ASSERT_TRUE(cachedImage->hasImage()); |
| 223 ASSERT_FALSE(cachedImage->image()->isNull()); | 221 ASSERT_FALSE(cachedImage->image()->isNull()); |
| 224 ASSERT_EQ(client.imageChangedCount(), 2); | 222 ASSERT_EQ(client.imageChangedCount(), 2); |
| 225 ASSERT_TRUE(client.notifyFinishedCalled()); | 223 ASSERT_TRUE(client.notifyFinishedCalled()); |
| 226 | 224 |
| 227 HashSet<ImageResource*> bitmapImages; | 225 HashSet<ImageResource*> bitmapImages; |
| 228 ASSERT_TRUE(cachedImage->image()->isBitmapImage()); | 226 ASSERT_TRUE(cachedImage->image()->isBitmapImage()); |
| 229 bitmapImages.add(cachedImage.get()); | 227 bitmapImages.add(cachedImage.get()); |
| 230 } | 228 } |
| 231 | 229 |
| 232 } // namespace | 230 } // namespace blink |
| OLD | NEW |