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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 FakeImageObserver() 52 FakeImageObserver()
53 : m_lastDecodedSize(0), m_lastDecodedSizeChangedDelta(0) {} 53 : m_lastDecodedSize(0), m_lastDecodedSizeChangedDelta(0) {}
54 54
55 virtual void decodedSizeChangedTo(const Image*, size_t newSize) { 55 virtual void decodedSizeChangedTo(const Image*, size_t newSize) {
56 m_lastDecodedSizeChangedDelta = 56 m_lastDecodedSizeChangedDelta =
57 safeCast<int>(newSize) - safeCast<int>(m_lastDecodedSize); 57 safeCast<int>(newSize) - safeCast<int>(m_lastDecodedSize);
58 m_lastDecodedSize = newSize; 58 m_lastDecodedSize = newSize;
59 } 59 }
60 bool shouldPauseAnimation(const Image*) override { return false; } 60 bool shouldPauseAnimation(const Image*) override { return false; }
61 void animationAdvanced(const Image*) override {} 61 void animationAdvanced(const Image*) override {}
62 void loadCompleted(const Image*) override { NOTREACHED(); }
62 63
63 virtual void changedInRect(const Image*, const IntRect&) {} 64 virtual void changedInRect(const Image*, const IntRect&) {}
64 65
65 size_t m_lastDecodedSize; 66 size_t m_lastDecodedSize;
66 int m_lastDecodedSizeChangedDelta; 67 int m_lastDecodedSizeChangedDelta;
67 }; 68 };
68 69
69 static PassRefPtr<SharedBuffer> readFile(const char* fileName) { 70 static PassRefPtr<SharedBuffer> readFile(const char* fileName) {
70 String filePath = testing::blinkRootDir(); 71 String filePath = testing::blinkRootDir();
71 filePath.append(fileName); 72 filePath.append(fileName);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 OriginRightBottom}, 327 OriginRightBottom},
327 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", 328 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg",
328 OriginLeftBottom}}; 329 OriginLeftBottom}};
329 330
330 INSTANTIATE_TEST_CASE_P( 331 INSTANTIATE_TEST_CASE_P(
331 DecodedImageOrientationHistogramTest, 332 DecodedImageOrientationHistogramTest,
332 DecodedImageOrientationHistogramTest, 333 DecodedImageOrientationHistogramTest,
333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); 334 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams));
334 335
335 } // namespace blink 336 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698