| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/extensions/active_tab_permission_granter.h" | 12 #include "chrome/browser/extensions/active_tab_permission_granter.h" |
| 13 #include "chrome/browser/extensions/tab_helper.h" | 13 #include "chrome/browser/extensions/tab_helper.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/sessions/session_id.h" | 15 #include "chrome/browser/sessions/session_id.h" |
| 16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 17 #include "chrome/common/extensions/extension_builder.h" | 17 #include "chrome/common/extensions/extension_builder.h" |
| 18 #include "chrome/common/extensions/features/feature.h" | |
| 19 #include "chrome/common/extensions/permissions/permissions_data.h" | 18 #include "chrome/common/extensions/permissions/permissions_data.h" |
| 20 #include "chrome/common/extensions/value_builder.h" | 19 #include "chrome/common/extensions/value_builder.h" |
| 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 22 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/navigation_details.h" | 22 #include "content/public/browser/navigation_details.h" |
| 24 #include "content/public/browser/navigation_entry.h" | 23 #include "content/public/browser/navigation_entry.h" |
| 25 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
| 26 #include "content/public/browser/notification_types.h" | 25 #include "content/public/browser/notification_types.h" |
| 27 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 28 #include "content/public/common/frame_navigate_params.h" | 27 #include "content/public/common/frame_navigate_params.h" |
| 29 #include "content/public/common/page_transition_types.h" | 28 #include "content/public/common/page_transition_types.h" |
| 30 #include "content/public/test/test_browser_thread.h" | 29 #include "content/public/test/test_browser_thread.h" |
| 30 #include "extensions/common/features/feature.h" |
| 31 | 31 |
| 32 using base::DictionaryValue; | 32 using base::DictionaryValue; |
| 33 using base::ListValue; | 33 using base::ListValue; |
| 34 using content::BrowserThread; | 34 using content::BrowserThread; |
| 35 using content::NavigationController; | 35 using content::NavigationController; |
| 36 | 36 |
| 37 namespace extensions { | 37 namespace extensions { |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 scoped_refptr<const Extension> CreateTestExtension( | 40 scoped_refptr<const Extension> CreateTestExtension( |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 Reload(); | 314 Reload(); |
| 315 | 315 |
| 316 EXPECT_FALSE(IsAllowed(extension, google, tab_id())); | 316 EXPECT_FALSE(IsAllowed(extension, google, tab_id())); |
| 317 EXPECT_FALSE(IsAllowed(extension, google_h1, tab_id())); | 317 EXPECT_FALSE(IsAllowed(extension, google_h1, tab_id())); |
| 318 EXPECT_FALSE(IsAllowed(extension, chromium, tab_id())); | 318 EXPECT_FALSE(IsAllowed(extension, chromium, tab_id())); |
| 319 EXPECT_FALSE(IsAllowed(extension, chromium_h1, tab_id())); | 319 EXPECT_FALSE(IsAllowed(extension, chromium_h1, tab_id())); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace | 322 } // namespace |
| 323 } // namespace extensions | 323 } // namespace extensions |
| OLD | NEW |