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

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

Issue 630853002: Replacing the OVERRIDE with override in third_party/WebKit/Source/platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase build fix Created 6 years, 2 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/BitmapPattern.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class BitmapImageTest : public ::testing::Test { 44 class BitmapImageTest : public ::testing::Test {
45 public: 45 public:
46 class FakeImageObserver : public ImageObserver { 46 class FakeImageObserver : public ImageObserver {
47 public: 47 public:
48 FakeImageObserver() : m_lastDecodedSizeChangedDelta(0) { } 48 FakeImageObserver() : m_lastDecodedSizeChangedDelta(0) { }
49 49
50 virtual void decodedSizeChanged(const Image*, int delta) 50 virtual void decodedSizeChanged(const Image*, int delta)
51 { 51 {
52 m_lastDecodedSizeChangedDelta = delta; 52 m_lastDecodedSizeChangedDelta = delta;
53 } 53 }
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 = Platform::current()->unitTestSupport()->webKitRootDir( ); 64 String filePath = Platform::current()->unitTestSupport()->webKitRootDir( );
65 filePath.append(fileName); 65 filePath.append(fileName);
66 return Platform::current()->unitTestSupport()->readFromFile(filePath); 66 return Platform::current()->unitTestSupport()->readFromFile(filePath);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 m_image->advanceAnimation(0); 106 m_image->advanceAnimation(0);
107 } 107 }
108 108
109 PassRefPtr<Image> imageForDefaultFrame() 109 PassRefPtr<Image> imageForDefaultFrame()
110 { 110 {
111 return m_image->imageForDefaultFrame(); 111 return m_image->imageForDefaultFrame();
112 } 112 }
113 113
114 protected: 114 protected:
115 virtual void SetUp() OVERRIDE 115 virtual void SetUp() override
116 { 116 {
117 DeferredImageDecoder::setEnabled(false); 117 DeferredImageDecoder::setEnabled(false);
118 m_image = BitmapImage::create(&m_imageObserver); 118 m_image = BitmapImage::create(&m_imageObserver);
119 } 119 }
120 120
121 FakeImageObserver m_imageObserver; 121 FakeImageObserver m_imageObserver;
122 RefPtr<BitmapImage> m_image; 122 RefPtr<BitmapImage> m_image;
123 }; 123 };
124 124
125 // Fails on the WebKit XP (deps) bot, see http://crbug.com/327104 125 // Fails on the WebKit XP (deps) bot, see http://crbug.com/327104
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 TEST_F(BitmapImageTest, icoHasWrongFrameDimensions) 238 TEST_F(BitmapImageTest, icoHasWrongFrameDimensions)
239 { 239 {
240 loadImage("/LayoutTests/fast/images/resources/wrong-frame-dimensions.ico"); 240 loadImage("/LayoutTests/fast/images/resources/wrong-frame-dimensions.ico");
241 // This call would cause crash without fix for 408026 241 // This call would cause crash without fix for 408026
242 imageForDefaultFrame(); 242 imageForDefaultFrame();
243 } 243 }
244 244
245 #endif // USE(QCMSLIB) 245 #endif // USE(QCMSLIB)
246 246
247 } // namespace blink 247 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/BitmapPattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698