| Index: chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc
|
| diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc
|
| index 56e217cf3315c70e55f79d4891b9152a19b53531..6f82c22658de756647f194877de94bf2df030d7c 100644
|
| --- a/chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc
|
| +++ b/chrome/common/extensions/manifest_tests/extension_manifests_chromepermission_unittest.cc
|
| @@ -8,10 +8,13 @@
|
| #include "chrome/common/extensions/extension_manifest_constants.h"
|
| #include "chrome/common/extensions/manifest.h"
|
| #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
|
| +#include "chrome/common/extensions/permissions/permissions_data.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace errors = extension_manifest_errors;
|
|
|
| +namespace extensions {
|
| +
|
| TEST_F(ExtensionManifestTest, ChromeURLPermissionInvalid) {
|
| LoadAndExpectError("permission_chrome_url_invalid.json",
|
| errors::kInvalidPermissionScheme);
|
| @@ -21,15 +24,12 @@ TEST_F(ExtensionManifestTest, ChromeURLPermissionAllowedWithFlag) {
|
| CommandLine::ForCurrentProcess()->AppendSwitch(
|
| switches::kExtensionsOnChromeURLs);
|
| std::string error;
|
| - scoped_refptr<extensions::Extension> extension =
|
| + scoped_refptr<Extension> extension =
|
| LoadAndExpectSuccess("permission_chrome_url_invalid.json");
|
| EXPECT_EQ("", error);
|
| const GURL newtab_url("chrome://newtab/");
|
| - EXPECT_TRUE(extension->CanExecuteScriptOnPage(newtab_url,
|
| - newtab_url,
|
| - 0,
|
| - NULL,
|
| - &error)) << error;
|
| + EXPECT_TRUE(PermissionsData::CanExecuteScriptOnPage(
|
| + extension, newtab_url, newtab_url, 0, NULL, &error)) << error;
|
| }
|
|
|
| TEST_F(ExtensionManifestTest, ChromeResourcesPermissionValidOnlyForComponents) {
|
| @@ -37,7 +37,10 @@ TEST_F(ExtensionManifestTest, ChromeResourcesPermissionValidOnlyForComponents) {
|
| errors::kInvalidPermissionScheme);
|
| std::string error;
|
| LoadExtension(Manifest("permission_chrome_resources_url.json"),
|
| - &error, extensions::Manifest::COMPONENT,
|
| - extensions::Extension::NO_FLAGS);
|
| + &error,
|
| + extensions::Manifest::COMPONENT,
|
| + Extension::NO_FLAGS);
|
| EXPECT_EQ("", error);
|
| }
|
| +
|
| +} // namespace extensions
|
|
|