Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: chrome/common/extensions/manifest_unittest.cc

Issue 23744004: Move the rest of extension_manifest_constants to top-level extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/manifest.h" 5 #include "extensions/common/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"
15 #include "chrome/common/extensions/features/simple_feature.h" 14 #include "chrome/common/extensions/features/simple_feature.h"
16 #include "extensions/common/error_utils.h" 15 #include "extensions/common/error_utils.h"
17 #include "extensions/common/features/feature.h" 16 #include "extensions/common/features/feature.h"
18 #include "extensions/common/install_warning.h" 17 #include "extensions/common/install_warning.h"
18 #include "extensions/common/manifest_constants.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 extensions {
22 namespace keys = extensions::manifest_keys;
23 22
24 namespace extensions { 23 namespace errors = manifest_errors;
24 namespace keys = manifest_keys;
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());
33 EXPECT_EQ(type == Manifest::TYPE_THEME, manifest->is_theme()); 33 EXPECT_EQ(type == Manifest::TYPE_THEME, manifest->is_theme());
34 EXPECT_EQ(type == Manifest::TYPE_PLATFORM_APP, 34 EXPECT_EQ(type == Manifest::TYPE_PLATFORM_APP,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698