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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
25 #include "chrome/common/extensions/extension_constants.h" | 25 #include "chrome/common/extensions/extension_constants.h" |
26 #include "chrome/common/extensions/extension_error_utils.h" | 26 #include "chrome/common/extensions/extension_error_utils.h" |
27 #include "chrome/common/extensions/extension_sidebar_defaults.h" | 27 #include "chrome/common/extensions/extension_sidebar_defaults.h" |
28 #include "chrome/common/extensions/file_browser_handler.h" | 28 #include "chrome/common/extensions/file_browser_handler.h" |
29 #include "chrome/common/extensions/url_pattern.h" | 29 #include "chrome/common/extensions/url_pattern.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 #include "webkit/glue/web_intent_service_data.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { | 36 static void AddPattern(URLPatternSet* extent, const std::string& pattern) { |
37 int schemes = URLPattern::SCHEME_ALL; | 37 int schemes = URLPattern::SCHEME_ALL; |
38 extent->AddPattern(URLPattern(schemes, pattern)); | 38 extent->AddPattern(URLPattern(schemes, pattern)); |
39 } | 39 } |
40 | 40 |
41 } | 41 } |
42 | 42 |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 // This guy is identical to the previous but doesn't ask for any | 1005 // This guy is identical to the previous but doesn't ask for any |
1006 // platform-app-only permissions. We should be able to load him and ask | 1006 // platform-app-only permissions. We should be able to load him and ask |
1007 // questions about his permissions. | 1007 // questions about his permissions. |
1008 scoped_refptr<Extension> extension( | 1008 scoped_refptr<Extension> extension( |
1009 LoadAndExpectSuccess("not_platform_app.json")); | 1009 LoadAndExpectSuccess("not_platform_app.json")); |
1010 ExtensionAPIPermissionSet apis = extension->GetActivePermissions()->apis(); | 1010 ExtensionAPIPermissionSet apis = extension->GetActivePermissions()->apis(); |
1011 for (ExtensionAPIPermissionSet::const_iterator i = apis.begin(); | 1011 for (ExtensionAPIPermissionSet::const_iterator i = apis.begin(); |
1012 i != apis.end(); ++i) | 1012 i != apis.end(); ++i) |
1013 EXPECT_NE(platform_app, info->GetByID(*i)->type_restrictions()); | 1013 EXPECT_NE(platform_app, info->GetByID(*i)->type_restrictions()); |
1014 } | 1014 } |
OLD | NEW |