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

Side by Side Diff: chrome/browser/extensions/extension_icon_manager_unittest.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/json/json_file_value_serializer.h" 5 #include "base/json/json_file_value_serializer.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_icon_manager.h" 9 #include "chrome/browser/extensions/extension_icon_manager.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // This is a specialization of ExtensionIconManager, with a special override to 72 // This is a specialization of ExtensionIconManager, with a special override to
73 // call back to the test when an icon has completed loading. 73 // call back to the test when an icon has completed loading.
74 class TestIconManager : public ExtensionIconManager { 74 class TestIconManager : public ExtensionIconManager {
75 public: 75 public:
76 explicit TestIconManager(ExtensionIconManagerTest* test) : test_(test) {} 76 explicit TestIconManager(ExtensionIconManagerTest* test) : test_(test) {}
77 virtual ~TestIconManager() {} 77 virtual ~TestIconManager() {}
78 78
79 // Overrides the ImageLoader callback, and calls through to the base class' 79 // Overrides the ImageLoader callback, and calls through to the base class'
80 // implementation. Then it lets the test know that an image load was observed. 80 // implementation. Then it lets the test know that an image load was observed.
81 virtual void OnImageLoaded(const std::string& extension_id, 81 virtual void OnImageLoaded(const std::string& extension_id,
82 const gfx::Image& image) OVERRIDE { 82 const gfx::Image& image) override {
83 ExtensionIconManager::OnImageLoaded(extension_id, image); 83 ExtensionIconManager::OnImageLoaded(extension_id, image);
84 test_->ImageLoadObserved(); 84 test_->ImageLoadObserved();
85 } 85 }
86 86
87 private: 87 private:
88 ExtensionIconManagerTest* test_; 88 ExtensionIconManagerTest* test_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(TestIconManager); 90 DISALLOW_COPY_AND_ASSIGN(TestIconManager);
91 }; 91 };
92 92
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Now re-load the icon - we should get the same result bitmap (and not the 174 // Now re-load the icon - we should get the same result bitmap (and not the
175 // default icon). 175 // default icon).
176 icon_manager.LoadIcon(profile.get(), extension.get()); 176 icon_manager.LoadIcon(profile.get(), extension.get());
177 WaitForImageLoad(); 177 WaitForImageLoad();
178 SkBitmap second_icon = icon_manager.GetIcon(extension->id()); 178 SkBitmap second_icon = icon_manager.GetIcon(extension->id());
179 EXPECT_FALSE(gfx::BitmapsAreEqual(second_icon, default_icon)); 179 EXPECT_FALSE(gfx::BitmapsAreEqual(second_icon, default_icon));
180 180
181 EXPECT_TRUE(gfx::BitmapsAreEqual(first_icon, second_icon)); 181 EXPECT_TRUE(gfx::BitmapsAreEqual(first_icon, second_icon));
182 } 182 }
183 #endif 183 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_geolocation_apitest.cc ('k') | chrome/browser/extensions/extension_icon_source_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698