OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_switches.h" | 6 #include "chrome/common/chrome_switches.h" |
7 #include "chrome/common/extensions/extension_constants.h" | 7 #include "chrome/common/extensions/extension_constants.h" |
8 #include "chrome/common/extensions/extension_messages.h" | |
9 #include "chrome/renderer/extensions/dispatcher.h" | 8 #include "chrome/renderer/extensions/dispatcher.h" |
10 #include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h" | 9 #include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h" |
11 #include "content/public/test/mock_render_process_host.h" | 10 #include "content/public/test/mock_render_process_host.h" |
12 #include "content/public/test/mock_render_thread.h" | 11 #include "content/public/test/mock_render_thread.h" |
13 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
14 #include "extensions/common/extension_builder.h" | 13 #include "extensions/common/extension_builder.h" |
| 14 #include "extensions/common/extension_messages.h" |
15 #include "extensions/common/permissions/permissions_data.h" | 15 #include "extensions/common/permissions/permissions_data.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 class RendererPermissionsPolicyDelegateTest : public testing::Test { | 22 class RendererPermissionsPolicyDelegateTest : public testing::Test { |
23 public: | 23 public: |
24 RendererPermissionsPolicyDelegateTest() { | 24 RendererPermissionsPolicyDelegateTest() { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // script. | 80 // script. |
81 scoped_refptr<const Extension> webstore_extension( | 81 scoped_refptr<const Extension> webstore_extension( |
82 CreateTestExtension(extension_misc::kWebStoreAppId)); | 82 CreateTestExtension(extension_misc::kWebStoreAppId)); |
83 extension_dispatcher_->OnLoadedInternal(webstore_extension); | 83 extension_dispatcher_->OnLoadedInternal(webstore_extension); |
84 extension_dispatcher_->OnActivateExtension(extension_misc::kWebStoreAppId); | 84 extension_dispatcher_->OnActivateExtension(extension_misc::kWebStoreAppId); |
85 EXPECT_FALSE(PermissionsData::CanExecuteScriptOnPage( | 85 EXPECT_FALSE(PermissionsData::CanExecuteScriptOnPage( |
86 extension.get(), kAnyUrl, kAnyUrl, -1, NULL, -1, &error)) << error; | 86 extension.get(), kAnyUrl, kAnyUrl, -1, NULL, -1, &error)) << error; |
87 } | 87 } |
88 | 88 |
89 } // namespace extensions | 89 } // namespace extensions |
OLD | NEW |