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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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 "chrome/common/extensions/extension_permission_set.h" 5 #include "chrome/common/extensions/extension_permission_set.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "chrome/common/extensions/extension_manifest_constants.h" 15 #include "chrome/common/extensions/extension_manifest_constants.h"
16 #include "chrome/common/extensions/extension_error_utils.h" 16 #include "chrome/common/extensions/extension_error_utils.h"
17 #include "chrome/common/extensions/extension_permission_set.h" 17 #include "chrome/common/extensions/extension_permission_set.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 using extensions::Extension;
21
20 namespace errors = extension_manifest_errors; 22 namespace errors = extension_manifest_errors;
21 namespace keys = extension_manifest_keys; 23 namespace keys = extension_manifest_keys;
22 namespace values = extension_manifest_values; 24 namespace values = extension_manifest_values;
23 namespace { 25 namespace {
24 26
25 static scoped_refptr<Extension> LoadManifest(const std::string& dir, 27 static scoped_refptr<Extension> LoadManifest(const std::string& dir,
26 const std::string& test_file, 28 const std::string& test_file,
27 int extra_flags) { 29 int extra_flags) {
28 FilePath path; 30 FilePath path;
29 PathService::Get(chrome::DIR_TEST_DATA, &path); 31 PathService::Get(chrome::DIR_TEST_DATA, &path);
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 AddPattern(&non_empty_extent, "http://www.google.com/*"); 1099 AddPattern(&non_empty_extent, "http://www.google.com/*");
1098 1100
1099 perm_set = new ExtensionPermissionSet( 1101 perm_set = new ExtensionPermissionSet(
1100 empty_apis, non_empty_extent, empty_extent); 1102 empty_apis, non_empty_extent, empty_extent);
1101 EXPECT_FALSE(perm_set->IsEmpty()); 1103 EXPECT_FALSE(perm_set->IsEmpty());
1102 1104
1103 perm_set = new ExtensionPermissionSet( 1105 perm_set = new ExtensionPermissionSet(
1104 empty_apis, empty_extent, non_empty_extent); 1106 empty_apis, empty_extent, non_empty_extent);
1105 EXPECT_FALSE(perm_set->IsEmpty()); 1107 EXPECT_FALSE(perm_set->IsEmpty());
1106 } 1108 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_permission_set.cc ('k') | chrome/common/extensions/extension_process_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698