OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/pepper_permission_util.h" | 5 #include "chrome/common/pepper_permission_util.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "chrome/common/extensions/features/feature_channel.h" | |
13 #include "components/crx_file/id_util.h" | 12 #include "components/crx_file/id_util.h" |
14 #include "components/version_info/version_info.h" | 13 #include "components/version_info/version_info.h" |
15 #include "extensions/common/extension_builder.h" | 14 #include "extensions/common/extension_builder.h" |
16 #include "extensions/common/extension_set.h" | 15 #include "extensions/common/extension_set.h" |
| 16 #include "extensions/common/features/feature_channel.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using chrome::IsExtensionOrSharedModuleWhitelisted; | 19 using chrome::IsExtensionOrSharedModuleWhitelisted; |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Return an extension with |id| which imports a module with the given | 25 // Return an extension with |id| which imports a module with the given |
26 // |import_id|. | 26 // |import_id|. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 GURL(not_in_sm_whitelist_url), &extensions, whitelist)); | 137 GURL(not_in_sm_whitelist_url), &extensions, whitelist)); |
138 | 138 |
139 // Note that the whitelist should be empty after this call, so tests checking | 139 // Note that the whitelist should be empty after this call, so tests checking |
140 // for failure to import will fail because of this. | 140 // for failure to import will fail because of this. |
141 whitelist.erase(shared_module->id()); | 141 whitelist.erase(shared_module->id()); |
142 EXPECT_FALSE(IsExtensionOrSharedModuleWhitelisted( | 142 EXPECT_FALSE(IsExtensionOrSharedModuleWhitelisted( |
143 GURL(extension_url), &extensions, whitelist)); | 143 GURL(extension_url), &extensions, whitelist)); |
144 } | 144 } |
145 | 145 |
146 } // namespace extensions | 146 } // namespace extensions |
OLD | NEW |