| 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 "chrome/common/extensions/manifest.h" | 5 #include "chrome/common/extensions/manifest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/common/extensions/extension_manifest_constants.h" | 14 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 15 #include "chrome/common/extensions/features/feature.h" | 15 #include "chrome/common/extensions/features/feature.h" |
| 16 #include "chrome/common/extensions/features/simple_feature.h" | 16 #include "chrome/common/extensions/features/simple_feature.h" |
| 17 #include "extensions/common/error_utils.h" | 17 #include "extensions/common/error_utils.h" |
| 18 #include "extensions/common/install_warning.h" | 18 #include "extensions/common/install_warning.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 namespace errors = extension_manifest_errors; | 21 namespace errors = extension_manifest_errors; |
| 22 namespace keys = extension_manifest_keys; | 22 namespace keys = extensions::manifest_keys; |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 | 25 |
| 26 class ManifestTest : public testing::Test { | 26 class ManifestTest : public testing::Test { |
| 27 public: | 27 public: |
| 28 ManifestTest() : default_value_("test") {} | 28 ManifestTest() : default_value_("test") {} |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 void AssertType(Manifest* manifest, Manifest::Type type) { | 31 void AssertType(Manifest* manifest, Manifest::Type type) { |
| 32 EXPECT_EQ(type, manifest->type()); | 32 EXPECT_EQ(type, manifest->type()); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 EXPECT_FALSE(manifest->Get(keys::kPageAction, &output)); | 212 EXPECT_FALSE(manifest->Get(keys::kPageAction, &output)); |
| 213 MutateManifest( | 213 MutateManifest( |
| 214 &manifest, keys::kPlatformAppBackground, NULL); | 214 &manifest, keys::kPlatformAppBackground, NULL); |
| 215 | 215 |
| 216 // Platform apps also can't have a "Commands" key. | 216 // Platform apps also can't have a "Commands" key. |
| 217 EXPECT_FALSE(manifest->HasKey(keys::kCommands)); | 217 EXPECT_FALSE(manifest->HasKey(keys::kCommands)); |
| 218 EXPECT_FALSE(manifest->Get(keys::kCommands, &output)); | 218 EXPECT_FALSE(manifest->Get(keys::kCommands, &output)); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 } // namespace extensions | 221 } // namespace extensions |
| OLD | NEW |