| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "platform/graphics/ImageFrameGenerator.h" | 27 #include "platform/graphics/ImageFrameGenerator.h" |
| 28 | 28 |
| 29 #include "platform/SharedBuffer.h" | 29 #include "platform/SharedBuffer.h" |
| 30 #include "platform/Task.h" | 30 #include "platform/Task.h" |
| 31 #include "platform/graphics/ImageDecodingStore.h" | 31 #include "platform/graphics/ImageDecodingStore.h" |
| 32 #include "platform/graphics/test/MockImageDecoder.h" | 32 #include "platform/graphics/test/MockImageDecoder.h" |
| 33 #include "public/platform/Platform.h" | 33 #include "public/platform/Platform.h" |
| 34 #include "public/platform/WebThread.h" | 34 #include "public/platform/WebThread.h" |
| 35 #include <gtest/gtest.h> | 35 #include <gtest/gtest.h> |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace blink { |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 // Helper methods to generate standard sizes. | 41 // Helper methods to generate standard sizes. |
| 42 SkISize fullSize() { return SkISize::Make(100, 100); } | 42 SkISize fullSize() { return SkISize::Make(100, 100); } |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 class ImageFrameGeneratorTest : public ::testing::Test, public MockImageDecoderC
lient { | 46 class ImageFrameGeneratorTest : public ::testing::Test, public MockImageDecoderC
lient { |
| 47 public: | 47 public: |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 if (i >= static_cast<MockAllocator*>(allocator())->m_callCount) { | 325 if (i >= static_cast<MockAllocator*>(allocator())->m_callCount) { |
| 326 // We have tested failures of all stages. This time all allocations | 326 // We have tested failures of all stages. This time all allocations |
| 327 // were successful. | 327 // were successful. |
| 328 EXPECT_TRUE(image); | 328 EXPECT_TRUE(image); |
| 329 break; | 329 break; |
| 330 } | 330 } |
| 331 EXPECT_FALSE(image); | 331 EXPECT_FALSE(image); |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace WebCore | 335 } // namespace blink |
| OLD | NEW |