| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/extensions/active_tab_permission_granter.h" | 6 #include "chrome/browser/extensions/active_tab_permission_granter.h" |
| 7 #include "chrome/browser/extensions/api/commands/command_service.h" | 7 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 8 #include "chrome/browser/extensions/browser_action_test_util.h" | 8 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 9 #include "chrome/browser/extensions/extension_action.h" | 9 #include "chrome/browser/extensions/extension_action.h" |
| 10 #include "chrome/browser/extensions/extension_action_manager.h" | 10 #include "chrome/browser/extensions/extension_action_manager.h" |
| 11 #include "chrome/browser/extensions/extension_apitest.h" | 11 #include "chrome/browser/extensions/extension_apitest.h" |
| 12 #include "chrome/browser/extensions/tab_helper.h" | 12 #include "chrome/browser/extensions/tab_helper.h" |
| 13 #include "chrome/browser/sessions/session_tab_helper.h" | 13 #include "chrome/browser/sessions/session_tab_helper.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/test/base/interactive_test_utils.h" | 16 #include "chrome/test/base/interactive_test_utils.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "content/public/test/browser_test_utils.h" | 20 #include "content/public/test/browser_test_utils.h" |
| 21 #include "extensions/browser/extension_registry.h" | 21 #include "extensions/browser/extension_registry.h" |
| 22 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
| 23 #include "extensions/common/feature_switch.h" | 23 #include "extensions/common/feature_switch.h" |
| 24 #include "extensions/common/manifest_constants.h" | 24 #include "extensions/common/manifest_constants.h" |
| 25 #include "extensions/common/permissions/permissions_data.h" | 25 #include "extensions/common/permissions/permissions_data.h" |
| 26 #include "extensions/test/result_catcher.h" |
| 26 | 27 |
| 27 using content::WebContents; | 28 using content::WebContents; |
| 28 | 29 |
| 29 namespace extensions { | 30 namespace extensions { |
| 30 | 31 |
| 31 namespace { | 32 namespace { |
| 32 // This extension ID is used for tests require a stable ID over multiple | 33 // This extension ID is used for tests require a stable ID over multiple |
| 33 // extension installs. | 34 // extension installs. |
| 34 const char kId[] = "pgoakhfeplldmjheffidklpoklkppipp"; | 35 const char kId[] = "pgoakhfeplldmjheffidklpoklkppipp"; |
| 35 | 36 |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 ASSERT_TRUE(catcher.GetNextResult()); | 726 ASSERT_TRUE(catcher.GetNextResult()); |
| 726 | 727 |
| 727 // The extension should now have removed its |onCommand| event listener. | 728 // The extension should now have removed its |onCommand| event listener. |
| 728 // Finally, the page should again receive the key. | 729 // Finally, the page should again receive the key. |
| 729 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( | 730 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( |
| 730 browser(), ui::VKEY_F, true, true, false, false)); | 731 browser(), ui::VKEY_F, true, true, false, false)); |
| 731 ASSERT_TRUE(catcher.GetNextResult()); | 732 ASSERT_TRUE(catcher.GetNextResult()); |
| 732 } | 733 } |
| 733 | 734 |
| 734 } // namespace extensions | 735 } // namespace extensions |
| OLD | NEW |