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 "extensions/common/extension_api.h" | 5 #include "extensions/common/extension_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 EXPECT_EQ(NULL, apis->GetSchema(std::string())); | 281 EXPECT_EQ(NULL, apis->GetSchema(std::string())); |
282 EXPECT_EQ(NULL, apis->GetSchema("experimental")); | 282 EXPECT_EQ(NULL, apis->GetSchema("experimental")); |
283 EXPECT_EQ(NULL, apis->GetSchema("experimental")); | 283 EXPECT_EQ(NULL, apis->GetSchema("experimental")); |
284 EXPECT_EQ(NULL, apis->GetSchema("foo")); | 284 EXPECT_EQ(NULL, apis->GetSchema("foo")); |
285 EXPECT_EQ(NULL, apis->GetSchema("foo")); | 285 EXPECT_EQ(NULL, apis->GetSchema("foo")); |
286 | 286 |
287 EXPECT_TRUE(apis->GetSchema("dns")); | 287 EXPECT_TRUE(apis->GetSchema("dns")); |
288 EXPECT_TRUE(apis->GetSchema("dns")); | 288 EXPECT_TRUE(apis->GetSchema("dns")); |
289 EXPECT_TRUE(apis->GetSchema("extension")); | 289 EXPECT_TRUE(apis->GetSchema("extension")); |
290 EXPECT_TRUE(apis->GetSchema("extension")); | 290 EXPECT_TRUE(apis->GetSchema("extension")); |
291 EXPECT_TRUE(apis->GetSchema("infobars")); | |
292 EXPECT_TRUE(apis->GetSchema("infobars")); | |
293 EXPECT_TRUE(apis->GetSchema("omnibox")); | 291 EXPECT_TRUE(apis->GetSchema("omnibox")); |
294 EXPECT_TRUE(apis->GetSchema("omnibox")); | 292 EXPECT_TRUE(apis->GetSchema("omnibox")); |
295 EXPECT_TRUE(apis->GetSchema("storage")); | 293 EXPECT_TRUE(apis->GetSchema("storage")); |
296 EXPECT_TRUE(apis->GetSchema("storage")); | 294 EXPECT_TRUE(apis->GetSchema("storage")); |
297 } | 295 } |
298 | 296 |
299 scoped_refptr<Extension> CreateExtensionWithPermissions( | 297 scoped_refptr<Extension> CreateExtensionWithPermissions( |
300 const std::set<std::string>& permissions) { | 298 const std::set<std::string>& permissions) { |
301 base::DictionaryValue manifest; | 299 base::DictionaryValue manifest; |
302 manifest.SetString("name", "extension"); | 300 manifest.SetString("name", "extension"); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 extension.get(), | 830 extension.get(), |
833 Feature::BLESSED_EXTENSION_CONTEXT, | 831 Feature::BLESSED_EXTENSION_CONTEXT, |
834 GURL()).is_available()); | 832 GURL()).is_available()); |
835 EXPECT_FALSE(extension_api->IsAvailable("pageAction", | 833 EXPECT_FALSE(extension_api->IsAvailable("pageAction", |
836 extension.get(), | 834 extension.get(), |
837 Feature::BLESSED_EXTENSION_CONTEXT, | 835 Feature::BLESSED_EXTENSION_CONTEXT, |
838 GURL()).is_available()); | 836 GURL()).is_available()); |
839 } | 837 } |
840 | 838 |
841 } // namespace extensions | 839 } // namespace extensions |
OLD | NEW |