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/utf_string_conversions.h" | 12 #include "base/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/extension_error_utils.h" | |
16 #include "chrome/common/extensions/features/feature.h" | 15 #include "chrome/common/extensions/features/feature.h" |
| 16 #include "extensions/common/error_utils.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace errors = extension_manifest_errors; | 19 namespace errors = extension_manifest_errors; |
20 namespace keys = extension_manifest_keys; | 20 namespace keys = extension_manifest_keys; |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 class ManifestTest : public testing::Test { | 24 class ManifestTest : public testing::Test { |
25 public: | 25 public: |
26 ManifestTest() : default_value_("test") {} | 26 ManifestTest() : default_value_("test") {} |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 EXPECT_FALSE(manifest->Get(keys::kCommands, &output)); | 202 EXPECT_FALSE(manifest->Get(keys::kCommands, &output)); |
203 | 203 |
204 MutateManifest( | 204 MutateManifest( |
205 &manifest, keys::kManifestVersion, Value::CreateIntegerValue(2)); | 205 &manifest, keys::kManifestVersion, Value::CreateIntegerValue(2)); |
206 EXPECT_TRUE(manifest->HasKey(keys::kCommands)); | 206 EXPECT_TRUE(manifest->HasKey(keys::kCommands)); |
207 EXPECT_TRUE(manifest->Get(keys::kCommands, &output)); | 207 EXPECT_TRUE(manifest->Get(keys::kCommands, &output)); |
208 } | 208 } |
209 }; | 209 }; |
210 | 210 |
211 } // namespace extensions | 211 } // namespace extensions |
OLD | NEW |