OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/common/extensions/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/stringprintf.h" |
16 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
17 #include "base/string_util.h" | |
18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/extensions/extension_action.h" | 20 #include "chrome/common/extensions/extension_action.h" |
21 #include "chrome/common/extensions/extension_constants.h" | 21 #include "chrome/common/extensions/extension_constants.h" |
22 #include "chrome/common/extensions/extension_error_utils.h" | 22 #include "chrome/common/extensions/extension_error_utils.h" |
23 #include "chrome/common/extensions/extension_resource.h" | 23 #include "chrome/common/extensions/extension_resource.h" |
24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
25 #include "content/common/json_value_serializer.h" | 25 #include "content/common/json_value_serializer.h" |
26 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
27 #include "net/base/mime_sniffer.h" | 27 #include "net/base/mime_sniffer.h" |
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 EXPECT_TRUE(Extension::GenerateId("test", &result)); | 1557 EXPECT_TRUE(Extension::GenerateId("test", &result)); |
1558 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); | 1558 EXPECT_EQ(result, "jpignaibiiemhngfjkcpokkamffknabf"); |
1559 | 1559 |
1560 EXPECT_TRUE(Extension::GenerateId("_", &result)); | 1560 EXPECT_TRUE(Extension::GenerateId("_", &result)); |
1561 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); | 1561 EXPECT_EQ(result, "ncocknphbhhlhkikpnnlmbcnbgdempcd"); |
1562 | 1562 |
1563 EXPECT_TRUE(Extension::GenerateId( | 1563 EXPECT_TRUE(Extension::GenerateId( |
1564 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); | 1564 "this_string_is_longer_than_a_single_sha256_hash_digest", &result)); |
1565 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); | 1565 EXPECT_EQ(result, "jimneklojkjdibfkgiiophfhjhbdgcfi"); |
1566 } | 1566 } |
OLD | NEW |