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

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

Issue 464273002: Cleanup namespace usage in platform/graphics/[filters/* to skia/*] and platform/graphics/[B-D]* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual void didDraw(const Image*) OVERRIDE { } 54 virtual void didDraw(const Image*) OVERRIDE { }
55 virtual bool shouldPauseAnimation(const Image*) OVERRIDE { return false; } 55 virtual bool shouldPauseAnimation(const Image*) OVERRIDE { return false; }
56 virtual void animationAdvanced(const Image*) OVERRIDE { } 56 virtual void animationAdvanced(const Image*) OVERRIDE { }
57 virtual void changedInRect(const Image*, const IntRect&) { } 57 virtual void changedInRect(const Image*, const IntRect&) { }
58 58
59 int m_lastDecodedSizeChangedDelta; 59 int m_lastDecodedSizeChangedDelta;
60 }; 60 };
61 61
62 static PassRefPtr<SharedBuffer> readFile(const char* fileName) 62 static PassRefPtr<SharedBuffer> readFile(const char* fileName)
63 { 63 {
64 String filePath = blink::Platform::current()->unitTestSupport()->webKitR ootDir(); 64 String filePath = Platform::current()->unitTestSupport()->webKitRootDir( );
65 filePath.append(fileName); 65 filePath.append(fileName);
66 return blink::Platform::current()->unitTestSupport()->readFromFile(fileP ath); 66 return Platform::current()->unitTestSupport()->readFromFile(filePath);
67 } 67 }
68 68
69 // Accessors to BitmapImage's protected methods. 69 // Accessors to BitmapImage's protected methods.
70 void destroyDecodedData(bool destroyAll) { m_image->destroyDecodedData(destr oyAll); } 70 void destroyDecodedData(bool destroyAll) { m_image->destroyDecodedData(destr oyAll); }
71 size_t frameCount() { return m_image->frameCount(); } 71 size_t frameCount() { return m_image->frameCount(); }
72 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; } 72 void setCurrentFrame(size_t frame) { m_image->m_currentFrame = frame; }
73 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr ameBytes; } 73 size_t frameDecodedSize(size_t frame) { return m_image->m_frames[frame].m_fr ameBytes; }
74 size_t decodedFramesCount() const { return m_image->m_frames.size(); } 74 size_t decodedFramesCount() const { return m_image->m_frames.size(); }
75 75
76 void loadImage(const char* fileName) 76 void loadImage(const char* fileName)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 TEST_F(BitmapImageTest, webpHasColorProfile) 198 TEST_F(BitmapImageTest, webpHasColorProfile)
199 { 199 {
200 loadImage("/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp" ); 200 loadImage("/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp" );
201 EXPECT_EQ(1u, decodedFramesCount()); 201 EXPECT_EQ(1u, decodedFramesCount());
202 EXPECT_TRUE(m_image->hasColorProfile()); 202 EXPECT_TRUE(m_image->hasColorProfile());
203 } 203 }
204 204
205 #endif // USE(QCMSLIB) 205 #endif // USE(QCMSLIB)
206 206
207 } // namespace 207 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | Source/platform/graphics/Canvas2DImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698