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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/common/extensions/extension.h" 6 #include "chrome/common/extensions/extension.h"
7 #include "chrome/common/extensions/extension_manifest_constants.h"
8 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" 7 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
9 #include "chrome/common/extensions/permissions/permissions_data.h" 8 #include "chrome/common/extensions/permissions/permissions_data.h"
10 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
11 #include "extensions/common/error_utils.h" 10 #include "extensions/common/error_utils.h"
12 #include "extensions/common/manifest.h" 11 #include "extensions/common/manifest.h"
12 #include "extensions/common/manifest_constants.h"
13 #include "extensions/common/switches.h" 13 #include "extensions/common/switches.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace errors = extension_manifest_errors; 16 namespace extensions {
17 17
18 namespace extensions { 18 namespace errors = manifest_errors;
19 19
20 TEST_F(ExtensionManifestTest, ChromeURLPermissionInvalid) { 20 TEST_F(ExtensionManifestTest, ChromeURLPermissionInvalid) {
21 LoadAndExpectWarning("permission_chrome_url_invalid.json", 21 LoadAndExpectWarning("permission_chrome_url_invalid.json",
22 ErrorUtils::FormatErrorMessage( 22 ErrorUtils::FormatErrorMessage(
23 errors::kInvalidPermissionScheme, 23 errors::kInvalidPermissionScheme,
24 chrome::kChromeUINewTabURL)); 24 chrome::kChromeUINewTabURL));
25 } 25 }
26 26
27 TEST_F(ExtensionManifestTest, ChromeURLPermissionAllowedWithFlag) { 27 TEST_F(ExtensionManifestTest, ChromeURLPermissionAllowedWithFlag) {
28 // Ignore the policy delegate for this test. 28 // Ignore the policy delegate for this test.
(...skipping 16 matching lines...) Expand all
45 "chrome://resources/")); 45 "chrome://resources/"));
46 std::string error; 46 std::string error;
47 LoadExtension(Manifest("permission_chrome_resources_url.json"), 47 LoadExtension(Manifest("permission_chrome_resources_url.json"),
48 &error, 48 &error,
49 extensions::Manifest::COMPONENT, 49 extensions::Manifest::COMPONENT,
50 Extension::NO_FLAGS); 50 Extension::NO_FLAGS);
51 EXPECT_EQ("", error); 51 EXPECT_EQ("", error);
52 } 52 }
53 53
54 } // namespace extensions 54 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698