| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 { "permissions5", true }, // bookmarks -> bookmarks,history | 613 { "permissions5", true }, // bookmarks -> bookmarks,history |
| 614 { "equivalent_warnings", false }, // tabs --> tabs, webNavigation | 614 { "equivalent_warnings", false }, // tabs --> tabs, webNavigation |
| 615 #if !defined(OS_CHROMEOS) // plugins aren't allowed in ChromeOS | 615 #if !defined(OS_CHROMEOS) // plugins aren't allowed in ChromeOS |
| 616 { "permissions4", false }, // plugin -> plugin,tabs | 616 { "permissions4", false }, // plugin -> plugin,tabs |
| 617 { "plugin1", false }, // plugin -> plugin | 617 { "plugin1", false }, // plugin -> plugin |
| 618 { "plugin2", false }, // plugin -> none | 618 { "plugin2", false }, // plugin -> none |
| 619 { "plugin3", true }, // none -> plugin | 619 { "plugin3", true }, // none -> plugin |
| 620 #endif | 620 #endif |
| 621 { "storage", false }, // none -> storage | 621 { "storage", false }, // none -> storage |
| 622 { "notifications", false }, // none -> notifications | 622 { "notifications", false }, // none -> notifications |
| 623 { "media_galleries1", true }, // read|all -> write|all | |
| 624 { "media_galleries2", true }, // write|all -> read|all | |
| 625 { "media_galleries3", true }, // all -> write|all | |
| 626 { "media_galleries4", false }, // read|all -> all | |
| 627 }; | 623 }; |
| 628 | 624 |
| 629 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTests); ++i) { | 625 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTests); ++i) { |
| 630 scoped_refptr<Extension> old_extension( | 626 scoped_refptr<Extension> old_extension( |
| 631 LoadManifest("allow_silent_upgrade", | 627 LoadManifest("allow_silent_upgrade", |
| 632 std::string(kTests[i].base_name) + "_old.json")); | 628 std::string(kTests[i].base_name) + "_old.json")); |
| 633 scoped_refptr<Extension> new_extension( | 629 scoped_refptr<Extension> new_extension( |
| 634 LoadManifest("allow_silent_upgrade", | 630 LoadManifest("allow_silent_upgrade", |
| 635 std::string(kTests[i].base_name) + "_new.json")); | 631 std::string(kTests[i].base_name) + "_new.json")); |
| 636 | 632 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 apis.insert(APIPermission::kWebRequest); | 1360 apis.insert(APIPermission::kWebRequest); |
| 1365 apis.insert(APIPermission::kFileBrowserHandler); | 1361 apis.insert(APIPermission::kFileBrowserHandler); |
| 1366 EXPECT_EQ(2U, apis.size()); | 1362 EXPECT_EQ(2U, apis.size()); |
| 1367 | 1363 |
| 1368 scoped_refptr<PermissionSet> perm_set; | 1364 scoped_refptr<PermissionSet> perm_set; |
| 1369 perm_set = new PermissionSet(apis, empty_extent, empty_extent); | 1365 perm_set = new PermissionSet(apis, empty_extent, empty_extent); |
| 1370 EXPECT_EQ(4U, perm_set->apis().size()); | 1366 EXPECT_EQ(4U, perm_set->apis().size()); |
| 1371 } | 1367 } |
| 1372 | 1368 |
| 1373 } // namespace extensions | 1369 } // namespace extensions |
| OLD | NEW |