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 "chrome/browser/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
6 #include "chrome/browser/extensions/extension_action.h" | 6 #include "chrome/browser/extensions/extension_action.h" |
7 #include "chrome/browser/extensions/extension_action_manager.h" | 7 #include "chrome/browser/extensions/extension_action_manager.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
11 #include "chrome/browser/extensions/extension_tab_util.h" | 11 #include "chrome/browser/extensions/extension_tab_util.h" |
12 #include "chrome/browser/extensions/extension_test_message_listener.h" | 12 #include "chrome/browser/extensions/extension_test_message_listener.h" |
13 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
14 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
16 #include "chrome/common/extensions/permissions/permissions_data.h" | |
17 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
18 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
19 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 #include "extensions/common/permissions/permissions_data.h" |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 namespace { | 22 namespace { |
23 | 23 |
24 // chrome.browserAction API tests that interact with the UI in such a way that | 24 // chrome.browserAction API tests that interact with the UI in such a way that |
25 // they cannot be run concurrently (i.e. openPopup API tests that require the | 25 // they cannot be run concurrently (i.e. openPopup API tests that require the |
26 // window be focused/active). | 26 // window be focused/active). |
27 class BrowserActionInteractiveTest : public ExtensionApiTest { | 27 class BrowserActionInteractiveTest : public ExtensionApiTest { |
28 public: | 28 public: |
29 BrowserActionInteractiveTest() {} | 29 BrowserActionInteractiveTest() {} |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 ExtensionService* service = extensions::ExtensionSystem::Get( | 189 ExtensionService* service = extensions::ExtensionSystem::Get( |
190 browser()->profile())->extension_service(); | 190 browser()->profile())->extension_service(); |
191 ASSERT_FALSE(PermissionsData::HasAPIPermissionForTab( | 191 ASSERT_FALSE(PermissionsData::HasAPIPermissionForTab( |
192 service->GetExtensionById(last_loaded_extension_id(), false), | 192 service->GetExtensionById(last_loaded_extension_id(), false), |
193 SessionID::IdForTab(browser()->tab_strip_model()->GetActiveWebContents()), | 193 SessionID::IdForTab(browser()->tab_strip_model()->GetActiveWebContents()), |
194 APIPermission::kTab)); | 194 APIPermission::kTab)); |
195 } | 195 } |
196 | 196 |
197 } // namespace | 197 } // namespace |
198 } // namespace extensions | 198 } // namespace extensions |
OLD | NEW |