OLD | NEW |
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 <memory> | 5 #include <memory> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/extensions/active_tab_permission_granter.h" | 13 #include "chrome/browser/extensions/active_tab_permission_granter.h" |
14 #include "chrome/browser/extensions/tab_helper.h" | 14 #include "chrome/browser/extensions/tab_helper.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/sessions/session_tab_helper.h" | 16 #include "chrome/browser/sessions/session_tab_helper.h" |
17 #include "chrome/common/extensions/features/feature_channel.h" | |
18 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 17 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
19 #include "components/version_info/version_info.h" | 18 #include "components/version_info/version_info.h" |
20 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/navigation_details.h" | 20 #include "content/public/browser/navigation_details.h" |
22 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
23 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
24 #include "content/public/browser/notification_types.h" | 23 #include "content/public/browser/notification_types.h" |
25 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
26 #include "content/public/common/frame_navigate_params.h" | 25 #include "content/public/common/frame_navigate_params.h" |
27 #include "content/public/test/test_browser_thread.h" | 26 #include "content/public/test/test_browser_thread.h" |
28 #include "extensions/browser/extension_registry.h" | 27 #include "extensions/browser/extension_registry.h" |
29 #include "extensions/common/extension.h" | 28 #include "extensions/common/extension.h" |
30 #include "extensions/common/extension_builder.h" | 29 #include "extensions/common/extension_builder.h" |
31 #include "extensions/common/features/feature.h" | 30 #include "extensions/common/features/feature.h" |
| 31 #include "extensions/common/features/feature_channel.h" |
32 #include "extensions/common/permissions/permissions_data.h" | 32 #include "extensions/common/permissions/permissions_data.h" |
33 #include "extensions/common/value_builder.h" | 33 #include "extensions/common/value_builder.h" |
34 | 34 |
35 using base::DictionaryValue; | 35 using base::DictionaryValue; |
36 using base::ListValue; | 36 using base::ListValue; |
37 using content::BrowserThread; | 37 using content::BrowserThread; |
38 using content::NavigationController; | 38 using content::NavigationController; |
39 | 39 |
40 namespace extensions { | 40 namespace extensions { |
41 namespace { | 41 namespace { |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 EXPECT_TRUE(permissions_data->HasAPIPermissionForTab( | 375 EXPECT_TRUE(permissions_data->HasAPIPermissionForTab( |
376 tab_id(), APIPermission::kTabCaptureForTab)); | 376 tab_id(), APIPermission::kTabCaptureForTab)); |
377 | 377 |
378 EXPECT_TRUE(IsBlocked(extension_with_tab_capture, internal, tab_id() + 1)); | 378 EXPECT_TRUE(IsBlocked(extension_with_tab_capture, internal, tab_id() + 1)); |
379 EXPECT_FALSE(permissions_data->HasAPIPermissionForTab( | 379 EXPECT_FALSE(permissions_data->HasAPIPermissionForTab( |
380 tab_id() + 1, APIPermission::kTabCaptureForTab)); | 380 tab_id() + 1, APIPermission::kTabCaptureForTab)); |
381 } | 381 } |
382 | 382 |
383 } // namespace | 383 } // namespace |
384 } // namespace extensions | 384 } // namespace extensions |
OLD | NEW |