OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/common/chrome_paths.h" | 8 #include "chrome/common/chrome_paths.h" |
9 #include "chrome/common/extensions/extension_action.h" | 9 #include "chrome/common/extensions/extension_action.h" |
10 #include "gfx/skia_util.h" | |
11 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "ui/gfx/skia_util.h" |
14 #include "webkit/glue/image_decoder.h" | 14 #include "webkit/glue/image_decoder.h" |
15 | 15 |
16 using gfx::BitmapsAreEqual; | 16 using gfx::BitmapsAreEqual; |
17 | 17 |
18 static SkBitmap LoadIcon(const std::string& filename) { | 18 static SkBitmap LoadIcon(const std::string& filename) { |
19 FilePath path; | 19 FilePath path; |
20 PathService::Get(chrome::DIR_TEST_DATA, &path); | 20 PathService::Get(chrome::DIR_TEST_DATA, &path); |
21 path = path.AppendASCII("extensions").AppendASCII(filename); | 21 path = path.AppendASCII("extensions").AppendASCII(filename); |
22 | 22 |
23 std::string file_contents; | 23 std::string file_contents; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); | 148 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); |
149 | 149 |
150 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz); | 150 action.SetPopupUrl(ExtensionAction::kDefaultTabId, url_baz); |
151 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); | 151 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); |
152 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); | 152 ASSERT_EQ(url_bar, action.GetPopupUrl(100)); |
153 | 153 |
154 action.ClearAllValuesForTab(100); | 154 action.ClearAllValuesForTab(100); |
155 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); | 155 ASSERT_EQ(url_baz, action.GetPopupUrl(1)); |
156 ASSERT_EQ(url_baz, action.GetPopupUrl(100)); | 156 ASSERT_EQ(url_baz, action.GetPopupUrl(100)); |
157 } | 157 } |
OLD | NEW |