OLD | NEW |
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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/common/extensions/extension_action.h" | 10 #include "chrome/common/extensions/extension_action.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image_skia.h" |
17 #include "ui/gfx/skia_util.h" | 17 #include "ui/gfx/skia_util.h" |
18 #include "webkit/glue/image_decoder.h" | 18 #include "webkit/glue/image_decoder.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 bool ImagesAreEqual(const gfx::Image& i1, const gfx::Image& i2) { | 22 bool ImagesAreEqual(const gfx::Image& i1, const gfx::Image& i2) { |
23 return gfx::BitmapsAreEqual(*i1.ToSkBitmap(), *i2.ToSkBitmap()); | 23 return gfx::BitmapsAreEqual(*i1.ToSkBitmap(), *i2.ToSkBitmap()); |
24 } | 24 } |
25 | 25 |
26 gfx::Image LoadIcon(const std::string& filename) { | 26 gfx::Image LoadIcon(const std::string& filename) { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz); | 228 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz); |
229 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); | 229 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); |
230 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); | 230 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); |
231 | 231 |
232 action.ClearAllValuesForTab(100); | 232 action.ClearAllValuesForTab(100); |
233 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); | 233 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); |
234 ASSERT_EQ(url_baz, action.GetPopupUrl(100)); | 234 ASSERT_EQ(url_baz, action.GetPopupUrl(100)); |
235 } | 235 } |
236 | 236 |
237 } // namespace | 237 } // namespace |
OLD | NEW |