| 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" | |
| 11 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
| 12 #include "chrome/browser/extensions/extension_test_message_listener.h" | 11 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 13 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
| 14 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
| 15 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
| 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 17 #include "chrome/test/base/interactive_test_utils.h" | 16 #include "chrome/test/base/interactive_test_utils.h" |
| 18 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 19 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "extensions/browser/extension_system.h" |
| 21 #include "extensions/common/permissions/permissions_data.h" | 21 #include "extensions/common/permissions/permissions_data.h" |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // chrome.browserAction API tests that interact with the UI in such a way that | 26 // chrome.browserAction API tests that interact with the UI in such a way that |
| 27 // they cannot be run concurrently (i.e. openPopup API tests that require the | 27 // they cannot be run concurrently (i.e. openPopup API tests that require the |
| 28 // window be focused/active). | 28 // window be focused/active). |
| 29 class BrowserActionInteractiveTest : public ExtensionApiTest { | 29 class BrowserActionInteractiveTest : public ExtensionApiTest { |
| 30 public: | 30 public: |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); | 258 EXPECT_TRUE(BrowserActionTestUtil(browser()).HasPopup()); |
| 259 | 259 |
| 260 // Press CTRL+TAB to change active tabs, the extension popup should close. | 260 // Press CTRL+TAB to change active tabs, the extension popup should close. |
| 261 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( | 261 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( |
| 262 browser(), ui::VKEY_TAB, true, false, false, false)); | 262 browser(), ui::VKEY_TAB, true, false, false, false)); |
| 263 EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); | 263 EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace | 266 } // namespace |
| 267 } // namespace extensions | 267 } // namespace extensions |
| OLD | NEW |