| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // These tests make sure SettingsOverridePermission values are set correctly. | 5 // These tests make sure SettingsOverridePermission values are set correctly. |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" | 10 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" |
| 11 #include "chrome/common/extensions/permissions/permissions_data.h" | |
| 12 #include "chrome/common/extensions/permissions/settings_override_permission.h" | 11 #include "chrome/common/extensions/permissions/settings_override_permission.h" |
| 13 #include "extensions/common/manifest_constants.h" | 12 #include "extensions/common/manifest_constants.h" |
| 14 #include "extensions/common/permissions/permission_set.h" | 13 #include "extensions/common/permissions/permission_set.h" |
| 14 #include "extensions/common/permissions/permissions_data.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class SettingsOverridePermissionTest : public ExtensionManifestTest { | 21 class SettingsOverridePermissionTest : public ExtensionManifestTest { |
| 22 protected: | 22 protected: |
| 23 enum Flags { | 23 enum Flags { |
| 24 kHomepage = 1, | 24 kHomepage = 1, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 | 129 |
| 130 EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kSearchProvider)); | 130 EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kSearchProvider)); |
| 131 EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kHomepage)); | 131 EXPECT_TRUE(permission_set->HasAPIPermission(APIPermission::kHomepage)); |
| 132 EXPECT_FALSE(permission_set->HasAPIPermission(APIPermission::kStartupPages)); | 132 EXPECT_FALSE(permission_set->HasAPIPermission(APIPermission::kStartupPages)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace | 135 } // namespace |
| 136 | 136 |
| 137 } // namespace extensions | 137 } // namespace extensions |
| OLD | NEW |